Skip to content

Commit 5cc8794

Browse files
committed
Update pgboss polling default interval to 10s
1 parent 76abca2 commit 5cc8794

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/shared/modules/global/queue-scheduler.service.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ import {
77
import * as PgBoss from 'pg-boss';
88
import { policies, Queue } from 'pg-boss';
99

10-
const PGBOSS_JOB_POLLING_INTERVAL = parseInt(
11-
process.env.PGBOSS_JOB_POLLING_INTERVAL || '1000',
12-
10,
10+
const PGBOSS_JOB_POLLING_INTERVAL_SEC = parseFloat(
11+
process.env.PGBOSS_JOB_POLLING_INTERVAL_SEC || '10',
1312
);
1413

1514
/**
@@ -216,7 +215,7 @@ export class QueueSchedulerService implements OnModuleInit, OnModuleDestroy {
216215
poll().catch((err) =>
217216
this.logger.error('Unhandled poll error', err),
218217
);
219-
}, PGBOSS_JOB_POLLING_INTERVAL);
218+
}, PGBOSS_JOB_POLLING_INTERVAL_SEC * 1000);
220219
}
221220
};
222221

0 commit comments

Comments
 (0)