fix queue collision

This commit is contained in:
smart_ex 2022-04-19 17:08:41 +10:00 committed by Danil Kovtonyuk
parent 03c439ff9f
commit 7254aa047f
No known key found for this signature in database
GPG Key ID: E72A919BF08C3746
1 changed files with 3 additions and 1 deletions

View File

@ -1,9 +1,11 @@
const { v4: uuid } = require('uuid')
const Queue = require('bull')
const { netId } = require('./config')
const { status } = require('./constants')
const { redis, redisUrl } = require('./modules/redis')
const queue = new Queue('proofs', redisUrl, {
const queue = new Queue(`proofs_${netId}`, redisUrl, {
lockDuration: 300000, // Key expiration time for job locks.
lockRenewTime: 30000, // Interval on which to acquire the job lock
stalledInterval: 30000, // How often check for stalled jobs (use 0 for never checking).