def __init__(self, events_es=None, redis=None): self.es = events_es or es_factory.connect("events") self._metrics = EventMetrics(self.es) self._skip_iteration_for_metric = set( config.get("services.events.ignore_iteration.metrics", []) ) self.redis = redis or redman.connection("apiserver") self.debug_images_iterator = DebugImagesIterator(es=self.es, redis=self.redis) self.debug_sample_history = DebugSampleHistory(es=self.es, redis=self.redis) self.events_iterator = EventsIterator(es=self.es)
def __init__(self, worker_bll: WorkerBLL = None, es: Elasticsearch = None): self.worker_bll = worker_bll or WorkerBLL() self.es = es or es_factory.connect("workers") self._metrics = QueueMetrics(self.es)
def __init__(self, events_es=None, redis=None): self.events_es = events_es or es_factory.connect("events") self.redis: StrictRedis = redis or redman.connection("apiserver")
def __init__(self, es=None, redis=None): self.es_client = es or es_factory.connect("workers") self.redis = redis or redman.connection("workers") self._stats = WorkerStats(self.es_client)
def __init__(self, events_es=None): self.events_es = (events_es if events_es is not None else es_factory.connect("events"))