This document describes the current stable version of Celery (4.1). For development docs, go here.
celery.worker.control
¶
Worker remote control command implementations.
-
class
celery.worker.control.
Panel
(*args, **kwargs)[source]¶ Global registry of remote control commands.
-
data
= {'active': <function active at 0x7ff821cccc80>, 'active_queues': <function active_queues at 0x7ff821cca400>, 'add_consumer': <function add_consumer at 0x7ff821cca2f0>, 'autoscale': <function autoscale at 0x7ff821cca1e0>, 'cancel_consumer': <function cancel_consumer at 0x7ff821cca378>, 'clock': <function clock at 0x7ff821ccc6a8>, 'conf': <function conf at 0x7ff821ccc1e0>, 'disable_events': <function disable_events at 0x7ff821ccc840>, 'dump_active': <function active at 0x7ff821cccc80>, 'dump_conf': <function conf at 0x7ff821ccc1e0>, 'dump_reserved': <function reserved at 0x7ff821cccbf8>, 'dump_revoked': <function revoked at 0x7ff821cccd08>, 'dump_schedule': <function scheduled at 0x7ff821cccae8>, 'dump_tasks': <function registered at 0x7ff821cccd90>, 'election': <function election at 0x7ff821ccc730>, 'enable_events': <function enable_events at 0x7ff821ccc7b8>, 'heartbeat': <function heartbeat at 0x7ff821ccc8c8>, 'hello': <function hello at 0x7ff821ccc950>, 'memdump': <function memdump at 0x7ff821cccf28>, 'memsample': <function memsample at 0x7ff821cccea0>, 'objgraph': <function objgraph at 0x7ff821ccce18>, 'ping': <function ping at 0x7ff821ccc9d8>, 'pool_grow': <function pool_grow at 0x7ff821cca048>, 'pool_restart': <function pool_restart at 0x7ff821cca158>, 'pool_shrink': <function pool_shrink at 0x7ff821cca0d0>, 'query_task': <function query_task at 0x7ff821ccc2f0>, 'rate_limit': <function rate_limit at 0x7ff821ccc598>, 'registered': <function registered at 0x7ff821cccd90>, 'report': <function report at 0x7ff821ccc158>, 'reserved': <function reserved at 0x7ff821cccbf8>, 'revoke': <function revoke at 0x7ff821ccc488>, 'revoked': <function revoked at 0x7ff821cccd08>, 'scheduled': <function scheduled at 0x7ff821cccae8>, 'shutdown': <function shutdown at 0x7ff821cca268>, 'stats': <function stats at 0x7ff821ccca60>, 'terminate': <function terminate at 0x7ff821ccc510>, 'time_limit': <function time_limit at 0x7ff821ccc620>}¶
-
meta
= {'active': controller_info_t(alias='dump_active', type='inspect', visible=True, default_timeout=1.0, help='List of tasks currently being executed.', signature=None, args=None, variadic=None), 'active_queues': controller_info_t(alias=None, type='inspect', visible=True, default_timeout=1.0, help='List the task queues a worker are currently consuming from.', signature=None, args=None, variadic=None), 'add_consumer': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Tell worker(s) to consume from task queue by name.', signature='<queue> [exchange [type [routing_key]]]', args=[('queue', <class 'str'>), ('exchange', <class 'str'>), ('exchange_type', <class 'str'>), ('routing_key', <class 'str'>)], variadic=None), 'autoscale': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Modify autoscale settings.', signature='[max [min]]', args=[('max', <class 'int'>), ('min', <class 'int'>)], variadic=None), 'cancel_consumer': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Tell worker(s) to stop consuming from task queue by name.', signature='<queue>', args=[('queue', <class 'str'>)], variadic=None), 'clock': controller_info_t(alias=None, type='inspect', visible=True, default_timeout=1.0, help='Get current logical clock value.', signature=None, args=None, variadic=None), 'conf': controller_info_t(alias='dump_conf', type='inspect', visible=True, default_timeout=1.0, help='List configuration.', signature='[include_defaults=False]', args=[('with_defaults', <function strtobool at 0x7ff825a13510>)], variadic=None), 'disable_events': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Tell worker(s) to stop sending task-related events.', signature=None, args=None, variadic=None), 'election': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Hold election.', signature=None, args=None, variadic=None), 'enable_events': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Tell worker(s) to send task-related events.', signature=None, args=None, variadic=None), 'heartbeat': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Tell worker(s) to send event heartbeat immediately.', signature=None, args=None, variadic=None), 'hello': controller_info_t(alias=None, type='inspect', visible=False, default_timeout=1.0, help='Request mingle sync-data.', signature=None, args=None, variadic=None), 'memdump': controller_info_t(alias=None, type='inspect', visible=True, default_timeout=1.0, help='Dump statistics of previous memsample requests.', signature='[n_samples=10]', args=[('samples', <class 'int'>)], variadic=None), 'memsample': controller_info_t(alias=None, type='inspect', visible=True, default_timeout=1.0, help='Sample current RSS memory usage.', signature=None, args=None, variadic=None), 'objgraph': controller_info_t(alias=None, type='inspect', visible=True, default_timeout=60.0, help='Create graph of uncollected objects (memory-leak debugging).', signature='[object_type=Request] [num=200 [max_depth=10]]', args=[('type', <class 'str'>), ('num', <class 'int'>), ('max_depth', <class 'int'>)], variadic=None), 'ping': controller_info_t(alias=None, type='inspect', visible=True, default_timeout=0.2, help='Ping worker(s).', signature=None, args=None, variadic=None), 'pool_grow': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Grow pool by n processes/threads.', signature='[N=1]', args=[('n', <class 'int'>)], variadic=None), 'pool_restart': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Restart execution pool.', signature=None, args=None, variadic=None), 'pool_shrink': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Shrink pool by n processes/threads.', signature='[N=1]', args=[('n', <class 'int'>)], variadic=None), 'query_task': controller_info_t(alias=None, type='inspect', visible=True, default_timeout=1.0, help='Query for task information by id.', signature='[id1 [id2 [... [idN]]]]', args=None, variadic='ids'), 'rate_limit': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Tell worker(s) to modify the rate limit for a task by type.', signature='<task_name> <rate_limit (e.g., 5/s | 5/m | 5/h)>', args=[('task_name', <class 'str'>), ('rate_limit', <class 'str'>)], variadic=None), 'registered': controller_info_t(alias='dump_tasks', type='inspect', visible=True, default_timeout=1.0, help='List of registered tasks.', signature='[attr1 [attr2 [... [attrN]]]]', args=None, variadic='taskinfoitems'), 'report': controller_info_t(alias=None, type='inspect', visible=True, default_timeout=1.0, help='Information about Celery installation for bug reports.', signature=None, args=None, variadic=None), 'reserved': controller_info_t(alias='dump_reserved', type='inspect', visible=True, default_timeout=1.0, help='List of currently reserved tasks, not including scheduled/active.', signature=None, args=None, variadic=None), 'revoke': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Revoke task by task id (or list of ids).', signature='[id1 [id2 [... [idN]]]]', args=None, variadic='task_id'), 'revoked': controller_info_t(alias='dump_revoked', type='inspect', visible=True, default_timeout=1.0, help='List of revoked task-ids.', signature=None, args=None, variadic=None), 'scheduled': controller_info_t(alias='dump_schedule', type='inspect', visible=True, default_timeout=1.0, help='List of currently scheduled ETA/countdown tasks.', signature=None, args=None, variadic=None), 'shutdown': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Shutdown worker(s).', signature=None, args=None, variadic=None), 'stats': controller_info_t(alias=None, type='inspect', visible=True, default_timeout=1.0, help='Request worker statistics/information.', signature=None, args=None, variadic=None), 'terminate': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Terminate task by task id (or list of ids).', signature='<signal> [id1 [id2 [... [idN]]]]', args=[('signal', <class 'str'>)], variadic='task_id'), 'time_limit': controller_info_t(alias=None, type='control', visible=True, default_timeout=1.0, help='Tell worker(s) to modify the time limit for task by type.', signature='<task_name> <soft_secs> [hard_secs]', args=[('task_name', <class 'str'>), ('soft', <class 'float'>), ('hard', <class 'float'>)], variadic=None)}¶
-