def __init__(self, name, job_queue, confirm_queue, db_config, drop_publisher, response_publisher): self.db_config = db_config self.drop_publisher = drop_publisher self.response_publisher = response_publisher self.db = None Worker.__init__(self, name, job_queue, confirm_queue)
def __init__(self, name, job_queue, confirm_queue, api_url, drop_publisher, lock, max_retries, sleep_time, retry_cache): self.api_url = api_url self.h = Http() self.drop_publisher = drop_publisher self.lock = lock self.max_retries = max_retries self.sleep_time = sleep_time self.retry_cache = retry_cache Worker.__init__(self, name, job_queue, confirm_queue)
def __init__(self, drop_publisher, predicates, drop_queue, follow_match=False): self.drop_publisher = drop_publisher self.pool = Pool() # Internal predicate registry self.predicates = {} if follow_match else [] self.follow_match = follow_match for t in predicates: if self.follow_match: self.predicates[t[0]] = t[1] else: self.predicates = predicates Worker.__init__(self, "Predicate Matcher", drop_queue, None)
def __init__(self, name, job_queue, confirm_queue, drop_publisher, cf_options, url_services): self.drop_publisher = drop_publisher self.cf_options = cf_options self.url_services = url_services Worker.__init__(self, name, job_queue, confirm_queue)
def __init__(self, name, job_queue, confirm_queue, scheduler): self.scheduler = scheduler Worker.__init__(self, name, job_queue, confirm_queue)
def __init__(self, name, job_queue, confirm_queue, poster): Worker.__init__(self, name, job_queue, confirm_queue) # Poster is an instance of UshahidiPosterDaemon self._poster = poster