Esempio n. 1
0
    def __init__(self, app=None, pool_cls=None, pool_concurrency=None):
        self.pool = instantiate(pool_cls or self.pool_cls,
                                limit=pool_concurrency or self.pool_concurrency)
        self.app = app_or_default(app)

        self.consumer = Consumer(callback=self.dispatch_tasks,
                                 app=self.app)
Esempio n. 2
0
 def __init__(self, callback=None, app=None):
     self.app = app_or_default(app)
     self.callback = callback
     super(Consumer, self).__init__()