MCPcopy
hub / github.com/celery/celery / setup_app_for_worker

Function setup_app_for_worker

celery/contrib/testing/worker.py:219–225  ·  view source on GitHub ↗

Setup the app to be used for starting an embedded worker.

(app: Celery, loglevel: Union[str, int], logfile: str)

Source from the content-addressed store, hash-verified

217
218
219def setup_app_for_worker(app: Celery, loglevel: Union[str, int], logfile: str) -> None:
220 """Setup the app to be used for starting an embedded worker."""
221 app.finalize()
222 app.set_current()
223 app.set_default()
224 type(app.log)._setup = False
225 app.log.setup(loglevel=loglevel, logfile=logfile)

Callers 1

_start_worker_threadFunction · 0.85

Calls 4

set_currentMethod · 0.80
set_defaultMethod · 0.80
finalizeMethod · 0.45
setupMethod · 0.45

Tested by

no test coverage detected