MCPcopy
hub / github.com/celery/celery / on_shutdown

Function on_shutdown

celery/worker/state.py:154–160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152 if current_process()._name == 'MainProcess':
153 @atexit.register
154 def on_shutdown():
155 if bench_first is not None and bench_last is not None:
156 print('- Time spent in benchmark: {!r}'.format(
157 bench_last - bench_first))
158 print('- Avg: {}'.format(
159 sum(bench_sample) / len(bench_sample)))
160 memdump()
161
162 def task_reserved(request):
163 """Called when a task is reserved by the worker."""

Callers

nothing calls this directly

Calls 2

memdumpFunction · 0.90
formatMethod · 0.45

Tested by

no test coverage detected