Deploy / deploy (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
673 B
TypeScript
24 lines
673 B
TypeScript
import { Queue } from 'bullmq'
|
|
|
|
import { judgeQueueName, type JudgeJobData } from './judge/job'
|
|
import { flowchartQueueName, type FlowchartJobData } from './flowchart/job'
|
|
import { createBlockingRedis } from './redis'
|
|
|
|
export const judgeQueue = new Queue<JudgeJobData>(judgeQueueName, {
|
|
connection: createBlockingRedis(),
|
|
defaultJobOptions: {
|
|
removeOnComplete: 100,
|
|
removeOnFail: 500,
|
|
},
|
|
})
|
|
|
|
export const flowchartQueue = new Queue<FlowchartJobData>(flowchartQueueName, {
|
|
connection: createBlockingRedis(),
|
|
defaultJobOptions: {
|
|
attempts: 3,
|
|
backoff: { type: 'exponential', delay: 2_000 },
|
|
removeOnComplete: 100,
|
|
removeOnFail: 500,
|
|
},
|
|
})
|