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

Function stop_task

app/utils/github_task.py:141–153  ·  view source on GitHub ↗
(_id)

Source from the content-addressed store, hash-verified

139
140# 停止Github 监控任务,只是改变状态
141def stop_task(_id):
142 from app.modules import SchedulerStatus
143 if len(_id) != 24:
144 return
145
146 item = find_github_scheduler(_id)
147 item["status"] = SchedulerStatus.STOP
148 item["next_run_date"] = "-"
149
150 query = {
151 "_id": ObjectId(_id)
152 }
153 utils.conn_db('github_scheduler').find_one_and_replace(query, item)

Callers

nothing calls this directly

Calls 1

find_github_schedulerFunction · 0.85

Tested by

no test coverage detected