MCPcopy Create free account
hub / github.com/C3ting/ARL / github_task_scheduler

Function github_task_scheduler

app/utils/github_task.py:78–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76
77# Github 监控任务调度,有个循环
78def github_task_scheduler():
79 items = list(utils.conn_db('github_scheduler').find())
80 for item in items:
81 try:
82 if item["status"] != SchedulerStatus.RUNNING:
83 continue
84
85 entry = CronTab(item["cron"])
86 next_sec = entry.next(default_utc=False)
87 if next_sec < 60 and abs(time.time() - item["last_run_time"]) > 60*3:
88 logger.info("github_cron_run {} {}".format(item["keyword"], str(item["_id"])))
89 github_cron_run(item)
90
91 except Exception as e:
92 logger.exception(e)
93
94
95def find_github_scheduler(_id):

Callers 1

run_foreverFunction · 0.90

Calls 1

github_cron_runFunction · 0.85

Tested by

no test coverage detected