fix(server): wrong queue options for worker executor (#10267)

This commit is contained in:
liuyi
2025-02-19 12:44:23 +08:00
committed by GitHub
parent 320875425c
commit 294002101d
3 changed files with 11 additions and 3 deletions

View File

@@ -29,9 +29,15 @@ defineStartupConfig('job', {
queue: {
prefix: 'affine_job',
defaultJobOptions: {
attempts: 3,
removeOnComplete: true,
removeOnFail: false,
attempts: 5,
removeOnComplete: {
age: 3600 /* 1h */,
count: 100,
},
removeOnFail: {
age: 24 * 3600 /* 1 day */,
count: 500,
},
},
},
worker: {},

View File

@@ -121,6 +121,7 @@ export class JobExecutor
await this.run(job.name as JobName, job.data);
},
{
...this.config.job.queue,
...this.config.job.worker,
connection: this.redis,
concurrency,