MCPcopy Index your code
hub / github.com/celery/celery / get_worker_error_messages

Function get_worker_error_messages

t/integration/test_serialization.py:30–54  ·  view source on GitHub ↗

run a worker and return its stderr :param name: the name of the worker :param env: the environment to run the worker in worker must be running in other process because of avoiding conflict.

(name, env)

Source from the content-addressed store, hash-verified

28
29
30def get_worker_error_messages(name, env):
31 """run a worker and return its stderr
32
33 :param name: the name of the worker
34 :param env: the environment to run the worker in
35
36 worker must be running in other process because of avoiding conflict."""
37 worker = subprocess.Popen(
38 [
39 "celery",
40 "--config",
41 "t.integration.test_serialization_config",
42 "worker",
43 "-c",
44 "2",
45 "-n",
46 f"{name}@%%h",
47 ],
48 stderr=subprocess.PIPE,
49 stdout=subprocess.PIPE,
50 env=env,
51 )
52 worker.terminate()
53 err = worker.stderr.read().decode("utf-8")
54 return err

Callers

nothing calls this directly

Calls 2

terminateMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…