def __init__(self, num_workers, mq_host, cf_options, url_services, pid_file, out_file): Daemon.__init__(self, pid_file, out_file, out_file, out_file) self.num_workers = num_workers self.mq_host = mq_host self.cf_options = cf_options self.url_services = url_services
def __init__(self, port, db_config, api_url, api_key, pid_file, out_file): Daemon.__init__(self, pid_file, out_file, out_file, out_file) self.port = port self.db_config = db_config self.api_url = api_url self.api_key = api_key self.db = None
def __init__(self, port, mq_host, db_config, pid_file, out_file, cf_options): Daemon.__init__(self, pid_file, out_file, out_file, out_file) self.port = port self.mq_host = mq_host self.db_config = db_config self.db = None self.cf_options = cf_options
def __init__(self, num_workers, mq_host, api_url, pid_file, out_file, sleep_time, max_retries): Daemon.__init__(self, pid_file, out_file, out_file, out_file) self.num_workers = num_workers self.api_url = api_url self.mq_host = mq_host self.lock = Lock() self.max_retries = int(max_retries) self.sleep_time = int(sleep_time) self.retry_cache = {}
def __init__(self, num_response_workers, num_channel_update_workers, mq_host, db_config, pid_file, out_file): Daemon.__init__(self, pid_file, out_file, out_file, out_file) self.rss_urls = {} self.num_response_workers = num_response_workers self.num_channel_update_workers = num_channel_update_workers self.mq_host = mq_host self.db_config = db_config self.db = None self.lock = RLock()
def __init__(self, pidfile, outfile, mq_host, num_workers, db_config): """Initialize the daemon, properties""" Daemon.__init__(self, pidfile, outfile, outfile, outfile) self.mq_host = mq_host self.num_workers = num_workers self._db_config = db_config self._db = None self._http = Http() # Shared lock to control access to the DB by the # worker threads self._lock = RLock()
def __init__(self, pidfile, stdout, options): Daemon.__init__(self, pidfile, stdout, stdout, stdout) self.mq_host = options.get('mq_host') # Track and follow predicates self.track = None self.follow = None track_auth = options.get('track_auth') follow_auth = options.get('follow_auth') self.auth = {} # Verify and load the oAuth params if self._verify_auth_params(track_auth): self.auth['track'] = self._load_oauth_config(track_auth) if self._verify_auth_params(follow_auth): self.auth['follow'] = self._load_oauth_config(follow_auth) # Internal predicate registry self.predicates = {} # Firehose streams self.track_stream = None self.follow_stream = None self.reconnect_track_stream = None self.reconnect_follow_stream = None # Tracks the status of the track and follow firehose streams self.track_stream_running = False self.follow_stream_running = False # Tracks changes to the predicates self.track_changed = False self.follow_change = False
def __init__(self, num_workers, mq_host, db_config, pid_file, out_file): Daemon.__init__(self, pid_file, out_file, out_file, out_file) self.num_workers = num_workers self.mq_host = mq_host self.db_config = db_config