Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

chore(config_update): update bull config #435

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/worker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const checkJobForRetry = (err, job) => {
(err.message.includes('timeout of 30000ms exceeded') ||
err.message.includes('Request failed with status code 400') ||
err.message.includes('Request failed with status code 502') ||
err.message.includes('Server selection timed out after 30000 ms') ||
err.message.includes('connection timed out'))
) {
return true
Expand All @@ -46,13 +47,13 @@ const opts = {
},
redis: { maxRetriesPerRequest: null, enableReadyCheck: false },
settings: {
lockDuration: 45000,
lockRenewTime: 22500,
stalledInterval: 30000,
lockDuration: 60000,
lockRenewTime: 30000,
stalledInterval: 45000,
maxStalledCount: 1
},
defaultJobOptions: {
stackTraceLimit: 20
stackTraceLimit: 10
},
createClient: function (type, redisOpts) {
switch (type) {
Expand Down Expand Up @@ -84,6 +85,7 @@ const addUniqueJob = (q, name, data = {}, opts = {}) => {
groupBy: 'market-data'
},
{
priority: 1,
removeOnComplete: true,
jobId: 'update-market-data-job'
}
Expand Down