(_id)
| 102 | |
| 103 | # 删除 Github 监控任务,还有结果和Hash |
| 104 | def delete_github_scheduler(_id): |
| 105 | if len(_id) != 24: |
| 106 | return |
| 107 | |
| 108 | query = { |
| 109 | "_id": ObjectId(_id) |
| 110 | } |
| 111 | utils.conn_db('github_scheduler').delete_one(query) |
| 112 | |
| 113 | result_query = { |
| 114 | "github_scheduler_id": _id |
| 115 | } |
| 116 | # 删除Github 结果 Hash |
| 117 | utils.conn_db('github_hash').delete_many(result_query) |
| 118 | # 删除Github 监控结果 |
| 119 | utils.conn_db('github_monitor_result').delete_many(result_query) |
| 120 | |
| 121 | |
| 122 | # 恢复 Github 监控任务,只是改变状态 |
nothing calls this directly
no outgoing calls
no test coverage detected