MCPcopy Create free account
hub / github.com/buct2012dbl/Dorchestrator / executeTask

Method executeTask

coding-agent/src/core/executor.ts:57–79  ·  view source on GitHub ↗
(task: Task<T>)

Source from the content-addressed store, hash-verified

55 }
56
57 private async executeTask<T>(task: Task<T>): Promise<void> {
58 this.running++;
59 const startTime = Date.now();
60
61 try {
62 const result = await task.fn();
63 this.results.set(task.id, {
64 id: task.id,
65 success: true,
66 result,
67 duration: Date.now() - startTime
68 });
69 } catch (error) {
70 this.results.set(task.id, {
71 id: task.id,
72 success: false,
73 error: error as Error,
74 duration: Date.now() - startTime
75 });
76 } finally {
77 this.running--;
78 }
79 }
80
81 getStats() {
82 const results = Array.from(this.results.values());

Callers 1

executeMethod · 0.95

Calls 1

setMethod · 0.45

Tested by

no test coverage detected