Пример #1
0
    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
Пример #2
0
    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
Пример #3
0
    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
Пример #4
0
    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
Пример #5
0
    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 = {}
Пример #6
0
    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 = {}
Пример #7
0
 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()
Пример #8
0
    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()
Пример #9
0
    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()
Пример #10
0
    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
Пример #11
0
    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
Пример #12
0
    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
Пример #13
0
    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
Пример #14
0
    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