MCPcopy
hub / github.com/celery/celery / disable_events

Function disable_events

celery/worker/control.py:356–363  ·  view source on GitHub ↗

Tell worker(s) to stop sending task-related events.

(state)

Source from the content-addressed store, hash-verified

354
355@control_command()
356def disable_events(state):
357 """Tell worker(s) to stop sending task-related events."""
358 dispatcher = state.consumer.event_dispatcher
359 if 'task' in dispatcher.groups:
360 dispatcher.groups.discard('task')
361 logger.info('Events of group {task} disabled by remote.')
362 return ok('task events disabled')
363 return ok('task events already disabled')
364
365
366@control_command()

Callers

nothing calls this directly

Calls 3

okFunction · 0.85
discardMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected