MCPcopy
hub / github.com/celery/celery / install_sync_handler

Method install_sync_handler

celery/apps/beat.py:155–160  ·  view source on GitHub ↗

Install a `SIGTERM` + `SIGINT` handler saving the schedule.

(self, service: beat.Service)

Source from the content-addressed store, hash-verified

153 )
154
155 def install_sync_handler(self, service: beat.Service) -> None:
156 """Install a `SIGTERM` + `SIGINT` handler saving the schedule."""
157 def _sync(signum: Signals, frame: FrameType) -> None:
158 service.sync()
159 raise SystemExit()
160 platforms.signals.update(SIGTERM=_sync, SIGINT=_sync)

Callers 1

start_schedulerMethod · 0.95

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected