(taskId: string)
| 360 | * Get the current size (offset) of a task's output file. |
| 361 | */ |
| 362 | export async function getTaskOutputSize(taskId: string): Promise<number> { |
| 363 | try { |
| 364 | return (await stat(getTaskOutputPath(taskId))).size |
| 365 | } catch (e) { |
| 366 | const code = getErrnoCode(e) |
| 367 | if (code === 'ENOENT') { |
| 368 | return 0 |
| 369 | } |
| 370 | logError(e) |
| 371 | return 0 |
| 372 | } |
| 373 | } |
| 374 | |
| 375 | /** |
| 376 | * Clean up a task's output file and write queue. |
nothing calls this directly
no test coverage detected