예제 #1
0
파일: run_huey.py 프로젝트: Psycojoker/huey
    def handle(self, *args, **options):
        config = load_config('huey.djhuey.conf.Configuration')

        if options['threads'] is not None:
            config.THREADS = options['threads']

        if options['periodic'] is not None:
            config.PERIODIC = options['periodic']

        self.autodiscover()

        queue = config.QUEUE
        result_store = config.RESULT_STORE
        task_store = config.TASK_STORE
        invoker = Invoker(queue, result_store, task_store)

        consumer = Consumer(invoker, config)
        consumer.run()
예제 #2
0
파일: run_huey.py 프로젝트: Psycojoker/huey
    def handle(self, *args, **options):
        config = load_config('huey.djhuey.conf.Configuration')

        if options['threads'] is not None:
            config.THREADS = options['threads']

        if options['periodic'] is not None:
            config.PERIODIC = options['periodic']
        
        self.autodiscover()
        
        queue = config.QUEUE
        result_store = config.RESULT_STORE
        task_store = config.TASK_STORE
        invoker = Invoker(queue, result_store, task_store)
        
        consumer = Consumer(invoker, config)
        consumer.run()
예제 #3
0
파일: consumer.py 프로젝트: Psycojoker/huey
 def test_consumer_loader(self):
     config = load_config('huey.tests.config.Config')
     self.assertTrue(isinstance(config.QUEUE, DummyQueue))
     self.assertEqual(config.QUEUE.name, 'test-queue')
예제 #4
0
 def test_consumer_loader(self):
     config = load_config('huey.tests.config.Config')
     self.assertTrue(isinstance(config.QUEUE, DummyQueue))
     self.assertEqual(config.QUEUE.name, 'test-queue')