record more logs from Background Queue
This commit is contained in:
parent
e81c8b075b
commit
d2a20fcccd
2 changed files with 10 additions and 9 deletions
|
|
@ -940,15 +940,6 @@ export class QueueService implements OnModuleInit {
|
|||
data.type,
|
||||
data,
|
||||
{
|
||||
removeOnComplete: {
|
||||
age: 3600 * 24 * 7, // keep up to 7 days
|
||||
count: 30,
|
||||
},
|
||||
removeOnFail: {
|
||||
age: 3600 * 24 * 7, // keep up to 7 days
|
||||
count: 100,
|
||||
},
|
||||
|
||||
// https://docs.bullmq.io/guide/retrying-failing-jobs#custom-back-off-strategies
|
||||
attempts: this.config.backgroundJobMaxAttempts ?? 8,
|
||||
backoff: {
|
||||
|
|
|
|||
|
|
@ -591,6 +591,16 @@ export class QueueProcessorService implements OnApplicationShutdown {
|
|||
settings: {
|
||||
backoffStrategy: httpRelatedBackoff,
|
||||
},
|
||||
// Keep a lot of jobs, because this queue moves *fast*!
|
||||
// https://docs.bullmq.io/guide/workers/auto-removal-of-jobs
|
||||
removeOnComplete: {
|
||||
age: 3600 * 24 * 7, // keep up to 7 days
|
||||
count: 1000,
|
||||
},
|
||||
removeOnFail: {
|
||||
age: 3600 * 24 * 7, // keep up to 7 days
|
||||
count: 1000,
|
||||
},
|
||||
});
|
||||
this.backgroundTaskWorker
|
||||
.on('active', (job) => logger.debug(`active id=${job.id}`))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue