예제 #1
0
파일: queue.py 프로젝트: Ebury/celery-tools
def clear_queue(app: 'celery.Celery', name: str):
    """
    Clear a Celery queue.

    :param app: Celery app.
    :param name: Queue name.
    """
    manager = amqp(app=app)
    manager.run('queue.purge', name)
예제 #2
0
 def test_command(self, cls):
     x = amqp(app=self.app)
     x.run()
     self.assertIs(cls.call_args[1]['app'], self.app)
예제 #3
0
 def test_command(self, cls):
     x = amqp(app=self.app)
     x.run()
     assert cls.call_args[1]['app'] is self.app
예제 #4
0
def init_worker(*args, **kwargs):
    logger.info('Initializing worker.')
    amqp_cli = amqp(app=app)
    amqp_cli.run('queue.purge', 'poll_instagram')
    logger.info('Purged missing beat in queue poll_instagram')
예제 #5
0
파일: test_amqp.py 프로젝트: Dalar/celery
 def test_command(self, cls):
     x = amqp(app=self.app)
     x.run()
     self.assertIs(cls.call_args[1]['app'], self.app)
예제 #6
0
파일: test_amqp.py 프로젝트: Scalr/celery
 def test_command(self, cls):
     x = amqp(app=self.app)
     x.run()
     assert cls.call_args[1]['app'] is self.app