class CreateSnapshotRequests:
- lock = Lock()
- condition = Condition(lock)
-
def __init__(self, handler: Any) -> None:
+ self.lock = Lock()
+ self.condition = Condition(self.lock)
self.handler = handler
self.rados = handler.module.rados
self.log = handler.log
SCHEDULE_OID = "rbd_mirror_snapshot_schedule"
REFRESH_DELAY_SECONDS = 60.0
- lock = Lock()
- condition = Condition(lock)
-
def __init__(self, module: Any) -> None:
+ self.lock = Lock()
+ self.condition = Condition(self.lock)
self.module = module
self.log = module.log
self.last_refresh_images = datetime(1970, 1, 1)
class PerfHandler:
- user_queries: Dict[PoolKeyT, Dict[str, Any]] = {}
- image_cache: Dict[str, str] = {}
-
- lock = Lock()
- query_condition = Condition(lock)
- refresh_condition = Condition(lock)
-
- image_name_cache: Dict[Tuple[int, str], Dict[str, str]] = {}
- image_name_refresh_time = datetime.fromtimestamp(0)
@classmethod
def prepare_regex(cls, value: Any) -> str:
and (pool_key[0] == search_key[0] or not search_key[0]))
def __init__(self, module: Any) -> None:
+ self.user_queries: Dict[PoolKeyT, Dict[str, Any]] = {}
+ self.image_cache: Dict[str, str] = {}
+
+ self.lock = Lock()
+ self.query_condition = Condition(self.lock)
+ self.refresh_condition = Condition(self.lock)
+
+ self.image_name_cache: Dict[Tuple[int, str], Dict[str, str]] = {}
+ self.image_name_refresh_time = datetime.fromtimestamp(0)
+
self.module = module
self.log = module.log
SCHEDULE_OID = "rbd_trash_purge_schedule"
REFRESH_DELAY_SECONDS = 60.0
- lock = Lock()
- condition = Condition(lock)
-
def __init__(self, module: Any) -> None:
+ self.lock = Lock()
+ self.condition = Condition(self.lock)
self.module = module
self.log = module.log
self.last_refresh_pools = datetime(1970, 1, 1)