def scheduler(self):
"""Runs the daemon scheduler
"""
self.write_pid(str(os.getpid()))
if self.setproctitle:
import setproctitle
setproctitle.setproctitle('mymongo_scheduler')
sched = BlockingScheduler()
try:
sched.add_job(self.dummy_sched, 'interval', minutes=1)
sched.start()
except Exception as e:
self.logger.error('Cannot start scheduler. Error: ' + str(e))
评论列表
文章目录