MCPcopy
hub / github.com/celery/celery / pool_restart

Function pool_restart

celery/worker/control.py:565–571  ·  view source on GitHub ↗

Restart execution pool.

(state, modules=None, reload=False, reloader=None, **kwargs)

Source from the content-addressed store, hash-verified

563
564@control_command()
565def pool_restart(state, modules=None, reload=False, reloader=None, **kwargs):
566 """Restart execution pool."""
567 if state.app.conf.worker_pool_restarts:
568 state.consumer.controller.reload(modules, reload, reloader=reloader)
569 return ok('reload started')
570 else:
571 raise ValueError('Pool restarts not enabled')
572
573
574@control_command(

Callers

nothing calls this directly

Calls 2

okFunction · 0.85
reloadMethod · 0.80

Tested by

no test coverage detected