MCPcopy
hub / github.com/celery/celery / install_platform_tweaks

Method install_platform_tweaks

celery/apps/worker.py:254–274  ·  view source on GitHub ↗

Install platform specific tweaks and workarounds.

(self, worker)

Source from the content-addressed store, hash-verified

252 return '\n'.join(banner) + '\n'
253
254 def install_platform_tweaks(self, worker):
255 """Install platform specific tweaks and workarounds."""
256 if self.app.IS_macOS:
257 self.macOS_proxy_detection_workaround()
258
259 # Install signal handler so SIGHUP restarts the worker.
260 if not self._isatty:
261 # only install HUP handler if detached from terminal,
262 # so closing the terminal window doesn't restart the worker
263 # into the background.
264 if self.app.IS_macOS:
265 # macOS can't exec from a process using threads.
266 # See https://github.com/celery/celery/issues#issue/152
267 install_HUP_not_supported_handler(worker)
268 else:
269 install_worker_restart_handler(worker)
270 install_worker_term_handler(worker)
271 install_worker_term_hard_handler(worker)
272 install_worker_int_handler(worker)
273 install_cry_handler()
274 install_rdb_handler()
275
276 def macOS_proxy_detection_workaround(self):
277 """See https://github.com/celery/celery/issues#issue/161."""

Callers 1

on_startMethod · 0.95

Tested by

no test coverage detected