MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / addTask

Method addTask

daemon/src/service/async_task_service/index.ts:98–103  ·  view source on GitHub ↗
(t: IAsyncTask)

Source from the content-addressed store, hash-verified

96 public static tasks = new Array<IAsyncTask>();
97
98 public static addTask(t: IAsyncTask) {
99 TaskCenter.tasks.push(t);
100 t.start();
101 t.on("stopped", () => TaskCenter.onTaskStopped(t));
102 t.on("error", () => TaskCenter.onTaskError(t));
103 }
104
105 public static onTaskStopped(t: IAsyncTask) {
106 logger.info("Async Task:", t.taskId, "Stopped.");

Callers 1

createQuickInstallTaskFunction · 0.80

Calls 5

onMethod · 0.80
onTaskStoppedMethod · 0.80
onTaskErrorMethod · 0.80
startMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected