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

Method install_sync_handler

celery/apps/beat.py:167–172  ·  view source on GitHub ↗

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

(self, service: beat.Service)

Source from the content-addressed store, hash-verified

165 )
166
167 def install_sync_handler(self, service: beat.Service) -> None:
168 """Install a `SIGTERM` + `SIGINT` handler saving the schedule."""
169 def _sync(signum: Signals, frame: FrameType) -> None:
170 service.sync()
171 raise SystemExit()
172 platforms.signals.update(SIGTERM=_sync, SIGINT=_sync)

Callers 1

start_schedulerMethod · 0.95

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected