(cohortId: string)
| 600 | } |
| 601 | |
| 602 | export async function enqueueCohortCompute(cohortId: string): Promise<void> { |
| 603 | await cohortComputeQueue.add( |
| 604 | 'cohortCompute', |
| 605 | { cohortId }, |
| 606 | { |
| 607 | jobId: `cohort-${cohortId}`, |
| 608 | removeOnComplete: { age: 3600 }, |
| 609 | removeOnFail: { age: 86400 }, |
| 610 | }, |
| 611 | ); |
| 612 | } |
| 613 | |
| 614 | export async function removeCohortComputeJob(cohortId: string): Promise<void> { |
| 615 | await cohortComputeQueue.remove( |