def purge(self, connection=None):
    'Discard all waiting tasks.\n\n        This will ignore all tasks waiting for execution, and they will\n        be deleted from the messaging server.\n\n        Arguments:\n            connection (kombu.Connection): Optional specific connection\n                instance to use.  If not provided a connection will\n                be acquired from the connection pool.\n\n        Returns:\n            int: the number of tasks discarded.\n        '
    with self.app.connection_or_acquire(connection) as conn:
        return self.app.amqp.TaskConsumer(conn).purge()
Discard all waiting tasks.

This will ignore all tasks waiting for execution, and they will
be deleted from the messaging server.

Arguments:
    connection (kombu.Connection): Optional specific connection
        instance to use.  If not provided a connection will
        be acquired from the connection pool.

Returns:
    int: the number of tasks discarded.
def purge(self, connection=None):
    'Discard all waiting tasks.\n\n        This will ignore all tasks waiting for execution, and they will\n        be deleted from the messaging server.\n\n        Arguments:\n            connection (kombu.Connection): Optional specific connection\n                instance to use.  If not provided a connection will\n                be acquired from the connection pool.\n\n        Returns:\n            int: the number of tasks discarded.\n        '
    with self.app.connection_or_acquire(connection) as conn:
        return self.app.amqp.TaskConsumer(conn).purge()