MCPcopy Index your code
hub / github.com/Noumena-Network/code / constructor

Method constructor

src/utils/task/TaskOutput.ts:58–75  ·  view source on GitHub ↗
(
    taskId: string,
    onProgress: ProgressCallback | null,
    stdoutToFile = false,
    maxMemory: number = DEFAULT_MAX_MEMORY,
  )

Source from the content-addressed store, hash-verified

56 static #pollInterval: ReturnType<typeof setInterval> | null = null
57
58 constructor(
59 taskId: string,
60 onProgress: ProgressCallback | null,
61 stdoutToFile = false,
62 maxMemory: number = DEFAULT_MAX_MEMORY,
63 ) {
64 this.taskId = taskId
65 this.path = getTaskOutputPath(taskId)
66 this.stdoutToFile = stdoutToFile
67 this.#maxMemory = maxMemory
68 this.#onProgress = onProgress
69
70 // Register for polling when stdout goes to a file and progress is needed.
71 // Actual polling is started/stopped by React via startPolling/stopPolling.
72 if (stdoutToFile && onProgress) {
73 TaskOutput.#registry.set(taskId, this)
74 }
75 }
76
77 /**
78 * Begin polling the output file for progress. Called from React

Callers

nothing calls this directly

Calls 2

setMethod · 0.80
getTaskOutputPathFunction · 0.70

Tested by

no test coverage detected