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)
def test_command(self, cls): x = amqp(app=self.app) x.run() self.assertIs(cls.call_args[1]['app'], self.app)
def test_command(self, cls): x = amqp(app=self.app) x.run() assert cls.call_args[1]['app'] is self.app
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')