(task: SendTask)
| 250 | await this.saveToDB(); |
| 251 | this.registerTask(task); |
| 252 | } |
| 253 | |
| 254 | // 删除任务 |
| 255 | async removeTask(taskId: number): Promise<boolean> { |
| 256 | const index = this.tasks.findIndex(task => task.task_id === taskId); |
| 257 | if (index !== -1) { |
| 258 | this.removeTaskFromCron(taskId); |
| 259 | this.tasks.splice(index, 1); |
no test coverage detected