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

celery.worker.control

Worker remote control command implementations.

class celery.worker.control.Panel(**kwargs)[source]

Global registry of remote control commands.

data = {'active': <function active at 0x7f4e80b91050>, 'active_queues': <function active_queues at 0x7f4e80b91668>, 'add_consumer': <function add_consumer at 0x7f4e80b91578>, 'autoscale': <function autoscale at 0x7f4e80b91488>, 'cancel_consumer': <function cancel_consumer at 0x7f4e80b915f0>, 'clock': <function clock at 0x7f4e80bd0aa0>, 'conf': <function conf at 0x7f4e80bd0668>, 'disable_events': <function disable_events at 0x7f4e80bd0c08>, u'dump_active': <function active at 0x7f4e80b91050>, u'dump_conf': <function conf at 0x7f4e80bd0668>, u'dump_reserved': <function reserved at 0x7f4e80bd0f50>, u'dump_revoked': <function revoked at 0x7f4e80b910c8>, u'dump_schedule': <function scheduled at 0x7f4e80bd0e60>, u'dump_tasks': <function registered at 0x7f4e80b91140>, 'election': <function election at 0x7f4e80bd0b18>, 'enable_events': <function enable_events at 0x7f4e80bd0b90>, 'heartbeat': <function heartbeat at 0x7f4e80bd0c80>, 'hello': <function hello at 0x7f4e80bd0cf8>, 'memdump': <function memdump at 0x7f4e80b912a8>, 'memsample': <function memsample at 0x7f4e80b91230>, 'objgraph': <function objgraph at 0x7f4e80b911b8>, 'ping': <function ping at 0x7f4e80bd0d70>, 'pool_grow': <function pool_grow at 0x7f4e80b91320>, 'pool_restart': <function pool_restart at 0x7f4e80b91410>, 'pool_shrink': <function pool_shrink at 0x7f4e80b91398>, 'query_task': <function query_task at 0x7f4e80bd0758>, 'rate_limit': <function rate_limit at 0x7f4e80bd09b0>, 'registered': <function registered at 0x7f4e80b91140>, 'report': <function report at 0x7f4e80bd0578>, 'reserved': <function reserved at 0x7f4e80bd0f50>, 'revoke': <function revoke at 0x7f4e80bd08c0>, 'revoked': <function revoked at 0x7f4e80b910c8>, 'scheduled': <function scheduled at 0x7f4e80bd0e60>, 'shutdown': <function shutdown at 0x7f4e80b91500>, 'stats': <function stats at 0x7f4e80bd0de8>, 'terminate': <function terminate at 0x7f4e80bd0938>, 'time_limit': <function time_limit at 0x7f4e80bd0a28>}
meta = {'active': controller_info_t(alias=u'dump_active', type=u'inspect', visible=True, default_timeout=1.0, help=u'List of tasks currently being executed.', signature=None, args=None, variadic=None), 'active_queues': controller_info_t(alias=None, type=u'inspect', visible=True, default_timeout=1.0, help=u'List the task queues a worker is currently consuming from.', signature=None, args=None, variadic=None), 'add_consumer': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Tell worker(s) to consume from task queue by name.', signature=u'<queue> [exchange [type [routing_key]]]', args=[(u'queue', <type 'unicode'>), (u'exchange', <type 'unicode'>), (u'exchange_type', <type 'unicode'>), (u'routing_key', <type 'unicode'>)], variadic=None), 'autoscale': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Modify autoscale settings.', signature=u'[max [min]]', args=[(u'max', <type 'int'>), (u'min', <type 'int'>)], variadic=None), 'cancel_consumer': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Tell worker(s) to stop consuming from task queue by name.', signature=u'<queue>', args=[(u'queue', <type 'unicode'>)], variadic=None), 'clock': controller_info_t(alias=None, type=u'inspect', visible=True, default_timeout=1.0, help=u'Get current logical clock value.', signature=None, args=None, variadic=None), 'conf': controller_info_t(alias=u'dump_conf', type=u'inspect', visible=True, default_timeout=1.0, help=u'List configuration.', signature=u'[include_defaults=False]', args=[(u'with_defaults', <function strtobool at 0x7f4e84c5b5f0>)], variadic=None), 'disable_events': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Tell worker(s) to stop sending task-related events.', signature=None, args=None, variadic=None), 'election': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Hold election.', signature=None, args=None, variadic=None), 'enable_events': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Tell worker(s) to send task-related events.', signature=None, args=None, variadic=None), 'heartbeat': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Tell worker(s) to send event heartbeat immediately.', signature=None, args=None, variadic=None), 'hello': controller_info_t(alias=None, type=u'inspect', visible=False, default_timeout=1.0, help=u'Request mingle sync-data.', signature=None, args=None, variadic=None), 'memdump': controller_info_t(alias=None, type=u'inspect', visible=True, default_timeout=1.0, help=u'Dump statistics of previous memsample requests.', signature=u'[n_samples=10]', args=[(u'samples', <type 'int'>)], variadic=None), 'memsample': controller_info_t(alias=None, type=u'inspect', visible=True, default_timeout=1.0, help=u'Sample current RSS memory usage.', signature=None, args=None, variadic=None), 'objgraph': controller_info_t(alias=None, type=u'inspect', visible=True, default_timeout=60.0, help=u'Create graph of uncollected objects (memory-leak debugging).', signature=u'[object_type=Request] [num=200 [max_depth=10]]', args=[(u'type', <type 'unicode'>), (u'num', <type 'int'>), (u'max_depth', <type 'int'>)], variadic=None), 'ping': controller_info_t(alias=None, type=u'inspect', visible=True, default_timeout=0.2, help=u'Ping worker(s).', signature=None, args=None, variadic=None), 'pool_grow': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Grow pool by n processes/threads.', signature=u'[N=1]', args=[(u'n', <type 'int'>)], variadic=None), 'pool_restart': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Restart execution pool.', signature=None, args=None, variadic=None), 'pool_shrink': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Shrink pool by n processes/threads.', signature=u'[N=1]', args=[(u'n', <type 'int'>)], variadic=None), 'query_task': controller_info_t(alias=None, type=u'inspect', visible=True, default_timeout=1.0, help=u'Query for task information by id.', signature=u'[id1 [id2 [... [idN]]]]', args=None, variadic=u'ids'), 'rate_limit': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Tell worker(s) to modify the rate limit for a task by type.', signature=u'<task_name> <rate_limit (e.g., 5/s | 5/m | 5/h)>', args=[(u'task_name', <type 'unicode'>), (u'rate_limit', <type 'unicode'>)], variadic=None), 'registered': controller_info_t(alias=u'dump_tasks', type=u'inspect', visible=True, default_timeout=1.0, help=u'List of registered tasks.', signature=u'[attr1 [attr2 [... [attrN]]]]', args=None, variadic=u'taskinfoitems'), 'report': controller_info_t(alias=None, type=u'inspect', visible=True, default_timeout=1.0, help=u'Information about Celery installation for bug reports.', signature=None, args=None, variadic=None), 'reserved': controller_info_t(alias=u'dump_reserved', type=u'inspect', visible=True, default_timeout=1.0, help=u'List of currently reserved tasks, not including scheduled/active.', signature=None, args=None, variadic=None), 'revoke': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Revoke task by task id (or list of ids).', signature=u'[id1 [id2 [... [idN]]]]', args=None, variadic=u'task_id'), 'revoked': controller_info_t(alias=u'dump_revoked', type=u'inspect', visible=True, default_timeout=1.0, help=u'List of revoked task-ids.', signature=None, args=None, variadic=None), 'scheduled': controller_info_t(alias=u'dump_schedule', type=u'inspect', visible=True, default_timeout=1.0, help=u'List of currently scheduled ETA/countdown tasks.', signature=None, args=None, variadic=None), 'shutdown': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Shutdown worker(s).', signature=None, args=None, variadic=None), 'stats': controller_info_t(alias=None, type=u'inspect', visible=True, default_timeout=1.0, help=u'Request worker statistics/information.', signature=None, args=None, variadic=None), 'terminate': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Terminate task by task id (or list of ids).', signature=u'<signal> [id1 [id2 [... [idN]]]]', args=[(u'signal', <type 'unicode'>)], variadic=u'task_id'), 'time_limit': controller_info_t(alias=None, type=u'control', visible=True, default_timeout=1.0, help=u'Tell worker(s) to modify the time limit for task by type.', signature=u'<task_name> <soft_secs> [hard_secs]', args=[(u'task_name', <type 'unicode'>), (u'soft', <type 'float'>), (u'hard', <type 'float'>)], variadic=None)}
classmethod register(*args, **kwargs)[source]