(_id)
| 139 | |
| 140 | # 停止Github 监控任务,只是改变状态 |
| 141 | def 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) |
nothing calls this directly
no test coverage detected