This document describes the current stable version of Celery (4.3). For development docs, go here.

celery.bin.purge

The celery purge program, used to delete messages from queues.

class celery.bin.purge.purge(app=None, get_app=None, no_color=False, stdout=None, stderr=None, quiet=False, on_error=None, on_usage_error=None)[source]

Erase all messages from all known task queues.

Warning

There’s no undo operation for this command.

add_arguments(parser)[source]
fmt_empty = 'No messages purged from {qnum} {queues}'
fmt_purged = 'Purged {mnum} {messages} from {qnum} known task {queues}.'
run(force=False, queues=None, exclude_queues=None, **kwargs)[source]
warn_prelude = '{warning}: This will remove all tasks from {queues}: {names}.\n There is no undo for this operation!\n\n(to skip this prompt use the -f option)\n'
warn_prompt = 'Are you sure you want to delete all tasks'