Exemplo n.º 1
0
    def run(self):
        # Parameters to be passed on to the queue worker
        queue_name = 'SEMANTICS_QUEUE'
        options = {
            'exchange_name': 'metadata',
            'exchange_type': 'fanout',
            'durable_queue': True,
            'prefetch_count': self.num_workers
        }

        drop_consumer = Consumer("semanticsqueue-consumer", self.mq_host,
                                 'SEMANTICS_QUEUE', options)

        drop_publisher = Publisher("Response Publisher", mq_host)

        for x in range(self.num_workers):
            SemanticsQueueWorker("semanticsqueue-worker-" + str(x),
                                 drop_consumer.message_queue,
                                 drop_consumer.confirm_queue, self.api_url,
                                 drop_publisher, self.lock, self.max_retries,
                                 self.sleep_time, self.retry_cache)

        log.info("Workers started")
        drop_consumer.join()
        log.info("Exiting")
Exemplo n.º 2
0
    def run(self):
        options = {
            'exchange_name': 'metadata',
            'exchange_type': 'fanout',
            'durable_queue': True,
            'prefetch_count': self.num_workers
        }
        drop_consumer = Consumer("mediaextractor-consumer", self.mq_host,
                                 'MEDIA_EXTRACTOR_QUEUE', options)
        drop_publisher = Publisher("Response Publisher", mq_host)

        for x in range(self.num_workers):
            MediaExtractorQueueWorker("mediaextractor-worker-" + str(x),
                                      drop_consumer.message_queue,
                                      drop_consumer.confirm_queue,
                                      drop_publisher, self.cf_options,
                                      self.url_services)
        log.info("Workers started")

        drop_consumer.join()
        log.info("Exiting")
Exemplo n.º 3
0
 def __init__(self, mq_host):
     Publisher.__init__(
         self, "RSS Fetch Response Publisher", mq_host, queue_name="RSS_FETCH_RESPONSE", durable=False
     )
Exemplo n.º 4
0
 def __init__(self, mq_host):
     Publisher.__init__(self, "RSS Fetch Response Publisher", mq_host,
                        queue_name='RSS_FETCH_RESPONSE', durable=False)
Exemplo n.º 5
0
 def __init__(self, mq_host):
     Publisher.__init__(self, "RSS Fetch Queue Publisher", mq_host,
                        queue_name='RSS_FETCH_QUEUE', durable=False)