mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix(server): wrong queue options for worker executor (#10267)
This commit is contained in:
@@ -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: {},
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user