* Get job status with effective status calculation
(jobId: string)
| 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 |
no test coverage detected