(
taskId: string,
onProgress: ProgressCallback | null,
stdoutToFile = false,
maxMemory: number = DEFAULT_MAX_MEMORY,
)
| 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 |
nothing calls this directly
no test coverage detected