MCPcopy Create free account
hub / github.com/refly-ai/refly / getJobStatus

Method getJobStatus

apps/api/src/modules/lambda/lambda.service.ts:419–440  ·  view source on GitHub ↗

* Get job status with effective status calculation

(jobId: string)

Source from the content-addressed store, hash-verified

417 * Get job status with effective status calculation
418 */
419 async getJobStatus(jobId: string): Promise<{
420 job: LambdaJobRecord | null;
421 effectiveStatus: string | null;
422 }> {
423 const job = await this.getJob(jobId);
424 if (!job) {
425 return { job: null, effectiveStatus: null };
426 }
427
428 let effectiveStatus: string;
429 if (job.status === 'failed') {
430 effectiveStatus = 'FAILED';
431 } else if (job.status === 'success') {
432 effectiveStatus = job.storageType === 'temporary' ? 'PENDING_PERSIST' : 'COMPLETED';
433 } else if (job.status === 'processing') {
434 effectiveStatus = 'PROCESSING';
435 } else {
436 effectiveStatus = 'PENDING';
437 }
438
439 return { job, effectiveStatus };
440 }
441
442 /**
443 * List jobs by user with pagination

Callers 6

parseViaLambdaMethod · 0.80
loadOrParseDriveFileMethod · 0.80
exportDocumentMethod · 0.80
getExportJobStatusMethod · 0.80

Calls 1

getJobMethod · 0.95

Tested by

no test coverage detected