MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / pauseTask

Method pauseTask

sendat/sendat.ts:286–295  ·  view source on GitHub ↗
(taskId: number)

Source from the content-addressed store, hash-verified

284 if (task && !task.pause) {
285 task.pause = true;
286 this.removeTaskFromCron(taskId);
287 await this.saveToDB();
288 return true;
289 }
290 return false;
291 }
292
293 // 恢复任务
294 async resumeTask(taskId: number): Promise<boolean> {
295 const task = this.getTask(taskId);
296 if (task && task.pause) {
297 task.pause = false;
298 this.registerTask(task);

Callers 1

handlePauseTaskMethod · 0.80

Calls 3

getTaskMethod · 0.95
removeTaskFromCronMethod · 0.95
saveToDBMethod · 0.95

Tested by

no test coverage detected