MCPcopy
hub / github.com/celery/celery / start

Method start

celery/beat.py:633–655  ·  view source on GitHub ↗
(self, embedded_process=False)

Source from the content-addressed store, hash-verified

631 self.schedule_filename, self.scheduler_cls)
632
633 def start(self, embedded_process=False):
634 info('beat: Starting...')
635 debug('beat: Ticking with max interval->%s',
636 humanize_seconds(self.scheduler.max_interval))
637
638 signals.beat_init.send(sender=self)
639 if embedded_process:
640 signals.beat_embedded_init.send(sender=self)
641 platforms.set_process_title('celery beat')
642
643 try:
644 while not self._is_shutdown.is_set():
645 interval = self.scheduler.tick()
646 if interval and interval > 0.0:
647 debug('beat: Waking up %s.',
648 humanize_seconds(interval, prefix='in '))
649 time.sleep(interval)
650 if self.scheduler.should_sync():
651 self.scheduler._do_sync()
652 except (KeyboardInterrupt, SystemExit):
653 self._is_shutdown.set()
654 finally:
655 self.sync()
656
657 def sync(self):
658 self.scheduler.close()

Callers 10

start_schedulerMethod · 0.95
myapp.pyFile · 0.45
mysecureapp.pyFile · 0.45
tasks.pyFile · 0.45
celery.pyFile · 0.45
myapp.pyFile · 0.45
myapp.pyFile · 0.45
myapp.pyFile · 0.45
runMethod · 0.45
runMethod · 0.45

Calls 12

syncMethod · 0.95
infoFunction · 0.85
debugFunction · 0.85
humanize_secondsFunction · 0.85
set_process_titleMethod · 0.80
is_setMethod · 0.80
should_syncMethod · 0.80
_do_syncMethod · 0.80
sendMethod · 0.45
tickMethod · 0.45
sleepMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected