MCPcopy
hub / github.com/celery/celery / run

Method run

celery/utils/threads.py:61–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

59 traceback.print_exc(None, sys.stderr)
60
61 def run(self):
62 body = self.body
63 shutdown_set = self.__is_shutdown.is_set
64 try:
65 while not shutdown_set():
66 try:
67 body()
68 except Exception as exc: # pylint: disable=broad-except
69 try:
70 self.on_crash('{0!r} crashed: {1!r}', self.name, exc)
71 self._set_stopped()
72 finally:
73 sys.stderr.flush()
74 os._exit(1) # exiting by normal means won't work
75 finally:
76 self._set_stopped()
77
78 def _set_stopped(self):
79 try:

Callers

nothing calls this directly

Calls 3

on_crashMethod · 0.95
_set_stoppedMethod · 0.95
flushMethod · 0.45

Tested by

no test coverage detected