mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-23 20:18:42 +08:00
fix(server): wrong queue options for worker executor (#10267)
This commit is contained in:
@@ -29,9 +29,15 @@ defineStartupConfig('job', {
|
|||||||
queue: {
|
queue: {
|
||||||
prefix: 'affine_job',
|
prefix: 'affine_job',
|
||||||
defaultJobOptions: {
|
defaultJobOptions: {
|
||||||
attempts: 3,
|
attempts: 5,
|
||||||
removeOnComplete: true,
|
removeOnComplete: {
|
||||||
removeOnFail: false,
|
age: 3600 /* 1h */,
|
||||||
|
count: 100,
|
||||||
|
},
|
||||||
|
removeOnFail: {
|
||||||
|
age: 24 * 3600 /* 1 day */,
|
||||||
|
count: 500,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
worker: {},
|
worker: {},
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ export class JobExecutor
|
|||||||
await this.run(job.name as JobName, job.data);
|
await this.run(job.name as JobName, job.data);
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
...this.config.job.queue,
|
||||||
...this.config.job.worker,
|
...this.config.job.worker,
|
||||||
connection: this.redis,
|
connection: this.redis,
|
||||||
concurrency,
|
concurrency,
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ export class PgWorkspaceDocStorageAdapter extends DocStorageAdapter {
|
|||||||
{
|
{
|
||||||
// keep it simple to let all update merged in one job
|
// keep it simple to let all update merged in one job
|
||||||
jobId: `doc:merge-pending-updates:${workspaceId}:${docId}`,
|
jobId: `doc:merge-pending-updates:${workspaceId}:${docId}`,
|
||||||
|
delay: 30 * 1000 /* 30s */,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
turn++;
|
turn++;
|
||||||
|
|||||||
Reference in New Issue
Block a user