コード例 #1
0
ファイル: rss_fetcher.py プロジェクト: agilee/SwiftRiver-Core
 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)
コード例 #2
0
    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)
コード例 #3
0
    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)
コード例 #4
0
ファイル: firehose.py プロジェクト: agilee/SwiftRiver-Core
    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)
コード例 #5
0
    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)
コード例 #6
0
 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)
コード例 #7
0
 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)
コード例 #8
0
 def __init__(self, name, job_queue, confirm_queue, scheduler):
     self.scheduler = scheduler
     Worker.__init__(self, name, job_queue, confirm_queue)
コード例 #9
0
 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)
コード例 #10
0
    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
コード例 #11
0
ファイル: ushahidi.py プロジェクト: Onuonga/SwiftRiver-Core
    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