(taskId: number)
| 257 | if (index !== -1) { |
| 258 | this.removeTaskFromCron(taskId); |
| 259 | this.tasks.splice(index, 1); |
| 260 | await this.saveToDB(); |
| 261 | return true; |
| 262 | } |
| 263 | return false; |
| 264 | } |
| 265 | |
| 266 | // 获取任务 |
| 267 | getTask(taskId: number): SendTask | undefined { |
| 268 | return this.tasks.find(task => task.task_id === taskId); |
| 269 | } |
| 270 | |
| 271 | // 获取所有任务 |
no test coverage detected