MCPcopy Create free account
hub / github.com/celery/celery / run

Method run

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

Source from the content-addressed store, hash-verified

114 traceback.print_exc(None, sys.stderr)
115
116 def run(self):
117 body = self.body
118 shutdown_set = self.__is_shutdown.is_set
119 try:
120 while not shutdown_set():
121 try:
122 body()
123 except Exception as exc: # pylint: disable=broad-except
124 try:
125 self.on_crash('{0!r} crashed: {1!r}', self.name, exc)
126 self._set_stopped()
127 finally:
128 sys.stderr.flush()
129 os._exit(1) # exiting by normal means won't work
130 finally:
131 self._set_stopped()
132
133 def _set_stopped(self):
134 try:

Callers

nothing calls this directly

Calls 4

on_crashMethod · 0.95
_set_stoppedMethod · 0.95
bodyFunction · 0.50
flushMethod · 0.45

Tested by

no test coverage detected