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

Method pruneTask

shift/shift.ts:1158–1178  ·  view source on GitHub ↗
(taskId: string)

Source from the content-addressed store, hash-verified

1156 const removable = this.tasks.get(removeTaskId);
1157 if (
1158 removable?.task.status === "completed" ||
1159 removable?.task.status === "failed"
1160 ) {
1161 this.tasks.delete(removeTaskId);
1162 }
1163 }
1164 }
1165 }
1166
1167 static cleanup(): void {
1168 for (const ownedTask of this.tasks.values()) {
1169 if (ownedTask.task.status === "running" || ownedTask.task.status === "pending") {
1170 ownedTask.task.status = "failed";
1171 }
1172 }
1173 this.tasks.clear();
1174 this.completedTaskIds = [];
1175 this.rateLimiter.reset();
1176 }
1177}
1178
1179// ==================== 导入导出功能 ====================
1180async function exportRules(): Promise<string> {
1181 if (useLowdb && lowdb) {

Callers 1

executeMethod · 0.95

Calls 2

getMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected