Ciao!
How are you?
I got a small queue issue.
My problem is, when I re-build my whole system (9 queues), everything becomes stalled.
How can I change it so that is not stalled anymore. One bye one, it works, but when I re-build 9 bull queues running, it is stalled.
See my code? Very simple? This is some small timeout config?
const getQueue = (named, process) => {
if (!kues.hasOwnProperty(named)) {
kues[named] = Queue(named, lib.settings.redis.url ,{
redis: lib.settings.redis.url
});
kues[named].process(process);
kues[named].on('error', (error) => {
let isWeirdError = false;
if (error.message === 'Cannot read property \'0\' of null') {
isWeirdError = true;
countErrorWeird++;
return;
}
if (!isWeirdError || countErrorWeird >= 100) {
mail.send(`webhook bull error ${named}`, error);
}
if (countErrorWeird >= 100) {
countErrorWeird = 0;
}
})
kues[named].on('stalled', function(job){
console.log(job)
mail.send(`webhook bull stalled ${named}`, job);
})
kues[named].on('failed', function(job, err){
console.log(job, err)
mail.send(`webhook bull failed ${named}`, {
err: err,
job: job,
});
})
}
kues[named].clean(1000 * 60 * 60 * 24);
return kues[named];
}
I increased the timeouts:
const getQueue = (named, process) => {
if (!kues.hasOwnProperty(named)) {
/*
lockDuration: Time in milliseconds to acquire the job lock. Set this to a higher value if you find that your jobs are being stalled because your job processor is CPU-intensive and blocking the event loop (see note below about stalled jobs). Set this to a lower value if your jobs are extremely time-sensitive and it might be OK if they get double-processed (due to them be falsly considered stalled).
*/
const lockDuration = 30000 * 10;
/*
lockRenewTime: Interval in milliseconds on which to acquire the job lock. It is set to lockDuration / 2 by default to give enough buffer to renew the lock each time before the job lock expires. It should never be set to a value larger than lockDuration. Set this to a lower value if you're finding that jobs are becoming stalled due to a CPU-intensive job processor function. Generally you shouldn't change this though.
this is the default
*/
const lockRenewTime = lockDuration / 2
kues[named] = Queue(named, lib.settings.redis.url ,{
redis: lib.settings.redis.url,
settings: {
// Key expiration time for job locks.
// extended X 10
lockDuration: lockDuration,
lockRenewTime: lockRenewTime,
// How often check for stalled jobs (use 0 for never checking).
/*
stalledInterval: Interval in milliseconds on which each worker will check for stalled jobs (i.e. unlocked jobs in the active state). See note below about stalled jobs. Set this to a lower value if your jobs are extremely time-sensitive. Set this to a higher value if your Redis CPU usage is high as this check can be expensive. Note that because each worker runs this on its own interval and checks the entire queue, the stalled job actually run much more frequently than this value would imply.
*/
stalledInterval: 30000,
// Max amount of times a stalled job will be re-processed.
/*
maxStalledCount: The maximum number of times a job can be restarted before it will be permamently failed with the error job stalled more than allowable limit. This is set to a default of 1 with the assumption that stalled jobs should be very rare (only due to process crashes) and you want to be on the safer side of not restarting jobs. Set this higher if stalled jobs are common (e.g. processes crash a lot) and it's generally OK to double process jobs.
*/
maxStalledCount: 1,
// Poll interval for delayed jobs and added jobs.
/*
guardInterval: Interval in milliseconds on which the delayed job watchdog will run. This watchdog is only in place for unstable Redis connections which can caused delayed jobs to not be processed. Set to a lower value if your Redis connection is unstable and delayed jobs aren't being processed in time.
*/
guardInterval: 5000,
// delay before processing next job in case of internal error.
/*
retryProcessDelay: Time in milliseconds in which to wait before trying to process jobs, in case of a Redis error. Set to a lower value on an unstable Redis connection.
*/
retryProcessDelay: 5000,
}
});
kues[named].process(process);
kues[named].on('error', (error) => {
let isWeirdError = false;
if (error.message === 'Cannot read property \'0\' of null') {
isWeirdError = true;
countErrorWeird++;
return;
}
if (!isWeirdError || countErrorWeird >= 100) {
mail.send(`webhook bull error ${named}`, error);
}
if (countErrorWeird >= 100) {
countErrorWeird = 0;
}
})
kues[named].on('stalled', function(job){
console.log(job)
mail.send(`webhook bull stalled ${named}`, job);
})
kues[named].on('failed', function(job, err){
console.log(job, err)
mail.send(`webhook bull failed ${named}`, {
err: err,
job: job,
});
})
}
kues[named].clean(1000 * 60 * 60 * 24);
return kues[named];
}
I get this every time now:
{
"timestamp": 1503562708431,
"opts": {
"attempts": 1,
"delay": 0,
"timestamp": 1503562708431
},
"name": "__default__",
"queue": {
"name": "corifeus-app-web-pages",
"token": "c3982f33-5a10-404b-a108-07f4b5e078b7",
"keyPrefix": "bull",
"clients": [
{
"options": {
"password": "UcHejl1zkGJgqnQVOIDbhrgnRWdSkrNIiTwghb5z0PXU8IMgYLeGndIQQgqICzi7ioGtE4Qt4LhFPGuUiDRRnxPgcrxviEFVImyR92NuboeUQZDsjGStXh4tq3tBD554",
"db": 2,
"host": "redis.patrikx3.com",
"port": 6379,
"family": 4,
"connectTimeout": 10000,
"keepAlive": 0,
"noDelay": true,
"connectionName": null,
"sentinels": null,
"name": null,
"role": "master",
"dropBufferSupport": false,
"enableOfflineQueue": true,
"enableReadyCheck": true,
"autoResubscribe": true,
"autoResendUnfulfilledCommands": true,
"lazyConnect": false,
"keyPrefix": "",
"reconnectOnError": null,
"readOnly": false,
"stringNumbers": false,
"showFriendlyErrorStack": false
},
"domain": null,
"_events": {},
"_eventsCount": 1,
"scriptsSet": {
"cleanOSet": {
"lua": "local jobs = redis.call(\"ZRANGE\", KEYS[1], 0, -1)\nlocal deleted = {}\nlocal deletedCount = 0\nlocal limit = tonumber(ARGV[3])\nlocal jobTS\nfor _, job in ipairs(jobs) do\n\n local jobKey = ARGV[1] .. job\n if (redis.call(\"EXISTS\", jobKey .. \":lock\") == 0) then\n jobTS = redis.call(\"HGET\", jobKey, \"timestamp\")\n if(not jobTS or jobTS < ARGV[2]) then\nredis.call(\"ZREM\", KEYS[1], job)\n redis.call(\"DEL\", jobKey)\n deletedCount = deletedCount + 1\n table.insert(deleted, job)\n end\n end\nend\nreturn deleted",
"sha": "f8dfd1aa1ffc53b1dcc29f9dae6840c27389645a",
"numberOfKeys": 1,
"keyPrefix": ""
},
"addJob": {
"lua": "--[[\n Adds a job to the queue by doing the following:\n - Increases the job counter if needed.\n - Creates a new job key with the job data.\n\n - if delayed:\n - computes timestamp.\n - adds to delayed zset.\n - Emits a global event 'delayed' if the job is delayed.\n - if not delayed\n - Adds the jobId to the wait/paused list in one of three ways:\n - LIFO\n - FIFO\n - prioritized.\n - Adds the job to the \"added\" list so that workers gets notified.\n\n Input:\n KEYS[1] 'wait',\n KEYS[2] 'paused'\n KEYS[3] 'meta-paused'\n KEYS[4] 'id'\n KEYS[5] 'delayed'\n KEYS[6] 'priority'\n\n ARGV[1] key prefix,\n ARGV[2] custom id (will not generate one automatically)\n ARGV[3] name\n ARGV[4] data (json stringified job data)\n ARGV[5] opts (json stringified job opts)\n ARGV[6] timestamp\n ARGV[7] delay\n ARGV[8] delayedTimestamp\n ARGV[9] priority\n ARGV[10] LIFO\n ARGV[11] token\n]]\nlocal jobId\nlocal jobIdKey\nlocal jobCounter = redis.call(\"INCR\", KEYS[4])\n\nif ARGV[2] == \"\" then\n jobId = jobCounter\n jobIdKey = ARGV[1] .. jobId\nelse\n jobId = ARGV[2]\n jobIdKey = ARGV[1] .. jobId\n if redis.call(\"EXISTS\", jobIdKey) == 1 then\n return jobId .. \"\" -- convert to string\n end\nend\n\n-- Store the job.\nredis.call(\"HMSET\", jobIdKey, \"name\", ARGV[3], \"data\", ARGV[4], \"opts\", ARGV[5], \"timestamp\", ARGV[6], \"delay\", ARGV[7])\n\n-- Check if job is delayed\nif(tonumber(ARGV[8]) \\x7e= 0) then\n local timestamp = tonumber(ARGV[8]) * 0x1000 + bit.band(jobCounter, 0xfff)\n redis.call(\"ZADD\", KEYS[5], timestamp, jobId)\n redis.call(\"PUBLISH\", KEYS[5], (timestamp / 0x1000))\nelse\n local target\n\n -- Whe check for the meta-paused key to decide if we are paused or not\n -- (since an empty list and !EXISTS are not really the same)\n local paused\n if redis.call(\"EXISTS\", KEYS[3]) ~= 1 then\n target = KEYS[1]\n paused = false\n else\n target = KEYS[2]\n paused = true\n end\n\n -- Standard or priority add\n local priority = tonumber(ARGV[9])\n if priority == 0 then\n -- LIFO or FIFO\n redis.call(ARGV[10], target, jobId)\n\n -- Emit waiting event (wait..ing@token)\n redis.call(\"PUBLISH\", KEYS[1] .. \"ing@\" .. ARGV[11], jobId)\n else\n -- Priority add\n redis.call(\"ZADD\", KEYS[6], priority, jobId)\n local count = redis.call(\"ZCOUNT\", KEYS[6], 0, priority)\n\n local len = redis.call(\"LLEN\", target)\n local id = redis.call(\"LINDEX\", target, len - (count-1))\n if id then\n redis.call(\"LINSERT\", target, \"BEFORE\", id, jobId)\n else\n redis.call(\"RPUSH\", target, jobId)\n end\n\n end\nend\n\nreturn jobId .. \"\" -- convert to string\n",
"sha": "5a77c1408a88c66dfedd77bbd7cd1bd3858acd4e",
"numberOfKeys": 6,
"keyPrefix": ""
},
"addWorkerData": {
"lua": "--[[\n Add worker data\n\n Input:\n ARGV[1] queue token\n ARGV[2] queue name\n ARGV[3] process name \n \n Event:\n progress(jobId, progress)\n]]",
"sha": "034b4a01f45243e24c6cfed61b65715595770652",
"numberOfKeys": 0,
"keyPrefix": ""
},
"extendLock": {
"lua": "--[[\n Extend lock and removes the job from the stalled set.\n\n Input:\n KEYS[1] 'lock',\n KEYS[2] 'stalled'\n\n ARGV[1] token\n ARGV[2] lock duration in milliseconds\n ARGV[3] jobid\n\n Output:\n \"1\" if lock extented succesfully.\n]]\nif redis.call(\"GET\", KEYS[1]) == ARGV[1] then\n if redis.call(\"SET\", KEYS[1], ARGV[1], \"PX\", ARGV[2]) then\n redis.call(\"SREM\"(KEYS[2], ARGV[3])\n return 1\n end\nend\nreturn 0\n",
"sha": "3cc5384f33be4ebbd393190479966c5a8839f496",
"numberOfKeys": 2,
"keyPrefix": ""
},
"getOrSetRepeatKey": {
"lua": "--[[\n Gets or sets, if none defined, the repeat key next iteration.\n Input: \n KEYS[1] repeat global key\n \n ARGV[1] repeat job key\n ARGV[2] Date.now()\n\n Output:\n Milliseconds for next iteration.\n]]\nlocal millis = redis.call(\"ZSCORE\", KEYS[1], ARGV[1])\n\nif(millis) then\n return millis;\nend\n\nredis.call(\"ZADD\", KEYS[1], ARGV[2], ARGV[1])\nreturn ARGV[2]\n",
"sha": "d08b9847d0bbdab37b47963d95710348256c6d17",
"numberOfKeys": 1,
"keyPrefix": ""
},
"isFinished": {
"lua": "--[[\n Checks if a job is finished (.i.e. is in the completed or failed set)\n\n Input: \n KEYS[1] completed key\n KEYS[2] failed key\n\n ARGV[1] job id\n Output:\n 0 - not finished.\n 1 - completed.\n 2 - failed.\n]]\nif redis.call(\"ZSCORE\", KEYS[1], ARGV[1]) \\x7e= false then\n return 1\nend\n\nif redis.call(\"ZSCORE\", KEYS[2], ARGV[1]) ~= false then\n return 2\nend\n\nreturn redis.call(\"ZSCORE\", KEYS[2], ARGV[1])\n",
"sha": "74c8631221de82c9ac8c1cb76e574a903fa0228c",
"numberOfKeys": 2,
"keyPrefix": ""
},
"isJobInList": {
"lua": "--[[\n Checks if job is in a given list.\n\n Input:\n KEYS[1]\n ARGV[1]\n\n Output:\n 1 if element found in the list.\n]]\nlocal function item_in_list (list, item)\n for _, v in pairs(list) do\n if v == item then\n return 1\n end\n end\n return nil\nend\nlocal items = redis.call(\"LRANGE\", KEYS[1] , 0, -1)\nreturn item_in_list(items, ARGV[1])\n",
"sha": "82cbb92bba99b2af0310f5151f2267ab7d17a0d7",
"numberOfKeys": 1,
"keyPrefix": ""
},
"moveStalledJobsToWait": {
"lua": "--[[\n Move stalled jobs to wait.\n\n Input:\n KEYS[1] 'stalled' (SET)\n KEYS[2] 'wait', (LIST)\n KEYS[3] 'active', (LIST)\n KEYS[4] 'failed', (ZSET)\n KEYS[5] 'stalled-check', (KEY)\n\n KEYS[6] 'meta-paused', (KEY)\n KEYS[7] 'paused', (LIST)\n\n ARGV[1] Max stalled job count\n ARGV[2] queue.toKey('')\n ARGV[3] timestamp\n ARGV[4] max check time\n\n Events:\n 'stalled' with stalled job ids.\n]]\n\n-- Check if we need to check for stalled jobs now.\nif redis.call(\"EXISTS\", KEYS[5]) == 1 then\n return {{}, {}}\nend\n\nredis.call(\"SET\", KEYS[5], ARGV[3], \"PX\", ARGV[4])\n\n-- Move all stalled jobs to wait\nlocal stalling = redis.call('SMEMBERS', KEYS[1])\nlocal stalled = {}\nlocal failed = {}\nif(#stalling > 0) then\n\n local dst\n -- wait or paused destination\n if redis.call(\"EXISTS\", KEYS[6]) \\x7e= 1 then\n dst = KEYS[2]\n else\n dst = KEYS[7]\n end\n\n redis.call('DEL', KEYS[1])\n\n local MAX_STALLED_JOB_COUNT = tonumber(ARGV[1])\n\n -- Remove from active list\n for i, jobId in ipairs(stalling) do\n local jobKey = ARGV[2] .. jobId\n\n -- Check that the lock is also missing, then we can handle this job as really stalled.\n if(redis.call(\"EXISTS\", jobKey .. \":lock\") == 0) then\n -- Remove from the active queue.\n local removed = redis.call(\"LREM\", KEYS[3], 1, jobId)\n\n -- If this job has been stalled too many times, such as if it crashes the worker, then fail it.\n local stalledCount = redis.call(\"HINCRBY\", jobKey, \"stalledCounter\", 1)\n if(stalledCount > MAX_STALLED_JOB_COUNT) then\n redis.call(\"ZADD\", KEYS[4], ARGV[3], job)\n redis.call(\"HSET\", jobKey, \"failedReason\", \"job stalled more than allowable limit\")\n table.insert(failed, jobId)\n else\n -- Move the job back to the wait queue, to immediately be picked up by a waiting worker.\n redis.call(\"RPUSH\", dst, jobId)\n\n -- TODO: Publish a global stalled event.\n -- redis.call('PUBLISH', KEYS[1], stalled);\n table.insert(stalled, jobId)\n end\n end\n end\nend\n\n-- Mark potentially stalled jobs\nlocal active = redis.call('LRANGE', KEYS[3], 0, -1)\nif(#active > 0) then\n redis.call('SADD', KEYS[1], unpack(active))\nend\n\nreturn {failed, stalled}\n",
"sha": "0c0dced6c1081448abf84f2e4f2d4f1d9ef3d120",
"numberOfKeys": 7,
"keyPrefix": ""
},
"moveToActive": {
"lua": "--[[\n Move next job to be processed to active, lock it and fetch its data. The job\n may be delayed, in that case we need to move it to the delayed set instead.\n\n This operation guarantees that the worker owns the job during the locks\n expiration time. The worker is responsible of keeping the lock fresh\n so that no other worker picks this job again.\n\n Input:\n KEYS[1] wait key\n KEYS[2] active key\n KEYS[3] priority key\n KEYS[4] active event key\n KEYS[5] stalled key\n\n ARGV[1] key prefix\n ARGV[2] lock token\n ARGV[3] lock duration in milliseconds\n ARGV[4] timestamp\n ARGV[5] optional jobid\n]]\n\nlocal jobId\nif(ARGV[5] \\x7e= \"\") then\n jobId = ARGV[5]\n\n -- clean stalled key\n redis.call(\"SREM\", KEYS[5], jobId)\nelse\n -- move from wait to active\n jobId = redis.call(\"RPOPLPUSH\", KEYS[1], KEYS[2])\nend\n\nif jobId then\n local jobKey = ARGV[1] .. jobId\n local lockKey = jobKey .. ':lock'\n\n -- get a the lock\n redis.call(\"SET\", lockKey, ARGV[2], \"PX\", ARGV[3])\n\n redis.call(\"ZREM\", KEYS[3], jobId) -- remove from priority\n redis.call(\"PUBLISH\", KEYS[4], jobId)\n redis.call(\"HSET\", jobKey, \"processedOn\", ARGV[4])\n\n return {redis.call(\"HGETALL\", jobKey), jobId} -- get job data\nend\n",
"sha": "0b46c57bf142226cd43f01c3b0bc258eaeca36f7",
"numberOfKeys": 5,
"keyPrefix": ""
},
"moveToDelayed": {
"lua": "--[[\n Moves job from active to delayed set.\n\n Input: \n KEYS[1] active key\n KEYS[2] delayed key\n KEYS[3] job key\n\n ARGV[1] delayedTimestamp\n ARGV[2] the id of the job\n ARGV[3] queue token\n\n Output:\n 0 - OK\n -1 - Missing job.\n -2 - Job is locked.\n\n Events:\n - delayed key.\n]]\nif redis.call(\"EXISTS\", KEYS[3]) == 1 then\n\n -- Check for job lock\n if ARGV[3] \\x7e= \"0\" then\n local lockKey = KEYS[3] .. ':lock'\n local lock = redis.call(\"GET\", lockKey)\n if redis.call(\"GET\", lockKey) ~= ARGV[3] then\n return -2\n end\n end\n \n local score = tonumber(ARGV[1])\n redis.call(\"ZADD\", KEYS[2], score, ARGV[2])\n redis.call(\"PUBLISH\", KEYS[2], (score / 0x1000))\n redis.call(\"LREM\", KEYS[1], 0, ARGV[2])\n\n return 0\nelse\n return -1\nend\n",
"sha": "e5200ec8694bd3b6687557859e19efa52d00a3da",
"numberOfKeys": 3,
"keyPrefix": ""
},
"moveToFinished": {
"lua": "--[[\n Move job from active to a finished status (completed o failed)\n A job can only be moved to completed if it was active.\n The job must be locked before it can be moved to a finished status,\n and the lock must be released in this script.\n\n Input:\n KEYS[1] active key\n KEYS[2] completed/failed key\n KEYS[3] jobId key\n\n ARGV[1] jobId\n ARGV[2] timestamp\n ARGV[3] msg property\n ARGV[4] return value / failed reason\n ARGV[5] token\n ARGV[6] shouldRemove\n ARGV[7] event data (? maybe just send jobid).\n\n Output:\n 0 OK\n -1 Missing key.\n -2 Missing lock.\n\n Events:\n 'completed/failed'\n]]\n\nif redis.call(\"EXISTS\", KEYS[3]) == 1 then -- // Make sure job exists\n if ARGV[5] \\x7e= \"0\" then\n local lockKey = KEYS[3] .. ':lock'\n if redis.call(\"GET\", lockKey) == ARGV[5] then\n redis.call(\"DEL\", lockKey)\n else\n return -2\n end\n end\n\n -- Remove from active list\n redis.call(\"LREM\", KEYS[1], -1, ARGV[1])\n\n -- Remove job?\n if ARGV[6] == \"1\" then\n redis.call(\"DEL\", KEYS[3])\n else\n -- Add to complete/failed set\n redis.call(\"ZADD\", KEYS[2], ARGV[2], ARGV[1])\n redis.call(\"HMSET\", KEYS[3], ARGV[3], ARGV[4], \"finishedOn\", ARGV[2]) -- \"returnvalue\" / \"failedReason\" and \"finishedOn\"\n end\n\n redis.call(\"PUBLISH\", KEYS[2], ARGV[7])\n return 0\nelse\n return -1\nend\n",
"sha": "c5d631348eb39ed94c56cef058723935461d6cd8",
"numberOfKeys": 3,
"keyPrefix": ""
},
"moveUnlockedJobsToWait": {
"lua": "--[[\n Looks for unlocked jobs in the active queue. This happens when if the job was being worked on,\n but the worker process died and it failed to renew the lock.\n We call these jobs 'stalled'. We resolve these by moving them back to wait to be re-processed.\n To prevent jobs from cycling endlessly between active and wait,\n (e.g. if the job handler keeps crashing), we limit the number stalled job recoveries to MAX_STALLED_JOB_COUNT.\n\n Input:\n KEYS[1] 'active',\n KEYS[2] 'wait',\n KEYS[3] 'failed'\n KEYS[4] 'meta-paused'\n KEYS[5] 'paused'\n KEYS[6] 'unlocked-check'\n\n ARGV[1] Max stalled job count\n ARGV[2] queue.toKey('')\n ARGV[3] timestamp\n ARGV[4] max check time\n]]\n\n-- Check if we need to check for stalled jobs now.\nif redis.call(\"EXISTS\", KEYS[6]) == 1 then\n return {{}, {}}\nend\n\nredis.call(\"SET\", KEYS[6], ARGV[3], \"PX\", ARGV[4])\n\nlocal MAX_STALLED_JOB_COUNT = tonumber(ARGV[1])\nlocal activeJobs = redis.call(\"LRANGE\", KEYS[1], 0, -1)\nlocal stalled = {}\nlocal failed = {}\nlocal dst\n\n-- wait or paused destination\nif redis.call(\"EXISTS\", KEYS[4]) \\x7e= 1 then\n dst = KEYS[2]\nelse\n dst = KEYS[5]\nend\nlocal dstAdded = dst .. \":added\"\n\nfor _, job in ipairs(activeJobs) do\n\n local jobKey = ARGV[2] .. job\n if(redis.call(\"EXISTS\", jobKey .. \":lock\") == 0) then\n -- Remove from the active queue.\n redis.call(\"LREM\", KEYS[1], 1, job)\n\n -- If it was previously locked then we consider it 'stalled' (Case A above). If this job\n -- has been stalled too many times, such as if it crashes the worker, then fail it.\n local stalledCount = redis.call(\"HINCRBY\", jobKey, \"stalledCounter\", 1)\n if(stalledCount > MAX_STALLED_JOB_COUNT) then\n redis.call(\"ZADD\", KEYS[3], ARGV[3], job)\n redis.call(\"HSET\", jobKey, \"failedReason\", \"job stalled more than allowable limit\")\n table.insert(failed, job)\n else\n -- Move the job back to the wait queue, to immediately be picked up by a waiting worker.\n redis.call(\"RPUSH\", dst, job)\n redis.call(\"RPUSH\", dstAdded, job)\n\n table.insert(stalled, job)\n end\n end\nend\n\n-- Push lost jobs into the :added list (in case a job was popped from the list but did not make it to the active list,\n-- very unlikely but a possible hazard)\nlocal diff = redis.call(\"LLEN\", dst) - redis.call(\"LLEN\", dstAdded)\nif diff > 0 then\n local res = redis.call( 'LRANGE', dst, 0, diff );\n redis.call(\"RPUSH\", dstAdded, unpack(res) );\nend\n\nreturn {failed, stalled}\n",
"sha": "577a00e6e1acf6472f4d42fb3b2fb010f5e79b5c",
"numberOfKeys": 6,
"keyPrefix": ""
},
"pause": {
"lua": "--[[\n Pauses or resumes a queue globably.\n\n Input:\n KEYS[1] 'wait' or 'paused''\n KEYS[2] 'paused' or 'wait'\n KEYS[3] 'meta-paused'\n KEYS[4] 'paused' o 'resumed' event.\n\n ARGV[1] 'paused' or 'resumed'\n\n Event:\n publish paused or resumed event.\n]]\nif redis.call(\"EXISTS\", KEYS[1]) == 1 then\n redis.call(\"RENAME\", KEYS[1], KEYS[2])\nend\n\nif ARGV[1] == \"paused\" then\n redis.call(\"SET\", KEYS[3], 1)\nelse\n redis.call(\"DEL\", KEYS[3])\nend\n\nredis.call(\"PUBLISH\", KEYS[4], ARGV[1])\n",
"sha": "e2ddbd9fca7395871e037fe2590eb03943de9fa9",
"numberOfKeys": 4,
"keyPrefix": ""
},
"releaseLock": {
"lua": "--[[\n Release lock\n\n Input:\n KEYS[1] 'lock',\n \n ARGV[1] token\n ARGV[2] lock duration in milliseconds\n \n Output:\n \"OK\" if lock extented succesfully.\n]]\nif redis.call(\"GET\", KEYS[1]) == ARGV[1] then\n return redis.call(\"DEL\", KEYS[1])\nelse\n return 0\nend\n",
"sha": "543e449927c21a2846ba4d95356286d35323c6ba",
"numberOfKeys": 1,
"keyPrefix": ""
},
"removeJob": {
"lua": "--[[\n Remove a job from all the queues it may be in as well as all its data.\n In order to be able to remove a job, it must be unlocked.\n\n Input:\n KEYS[1] 'active',\n KEYS[2] 'wait',\n KEYS[3] 'delayed',\n KEYS[4] 'paused',\n KEYS[5] 'completed',\n KEYS[6] 'failed',\n KEYS[7] jobId\n\n ARGV[1] jobId\n ARGV[2] lock token\n\n Events:\n 'removed'\n]]\n\n-- TODO PUBLISH global event 'removed'\n\nlocal lockKey = KEYS[7] .. ':lock'\nlocal lock = redis.call(\"GET\", lockKey)\nif not lock then -- or (lock == ARGV[2])) then\n redis.call(\"LREM\", KEYS[1], 0, ARGV[1])\n redis.call(\"LREM\", KEYS[2], 0, ARGV[1])\n redis.call(\"ZREM\", KEYS[3], ARGV[1])\n redis.call(\"LREM\", KEYS[4], 0, ARGV[1])\n redis.call(\"ZREM\", KEYS[5], ARGV[1])\n redis.call(\"ZREM\", KEYS[6], ARGV[1])\n redis.call(\"DEL\", KEYS[7])\n return 1\nelse\n return 0\nend\n",
"sha": "56c863200c9558c84183b958801541c47e3bfe67",
"numberOfKeys": 7,
"keyPrefix": ""
},
"reprocessJob": {
"lua": "--[[\n Attempts to reprocess a job\n\n Input:\n KEYS[1] job key\n KEYS[2] job lock key\n KEYS[3] job state\n KEYS[4] wait key\n\n ARGV[1] job.id,\n ARGV[2] (job.opts.lifo ? 'R' : 'L') + 'PUSH'\n\n Output:\n 1 means the operation was a success\n 0 means the job does not exist\n -1 means the job is currently locked and can't be retried.\n -2 means the job was not found in the expected set.\n\n Events:\n emits 'added' if succesfully moved job to wait.\n]]\nif (redis.call(\"EXISTS\", KEYS[1]) == 1) then\n if (redis.call(\"EXISTS\", KEYS[2]) == 0) then\n if (redis.call(\"ZREM\", KEYS[3], ARGV[1]) == 1) then\n redis.call(ARGV[2], KEYS[4], ARGV[1])\n redis.call(ARGV[2], KEYS[4] .. \":added\", ARGV[1])\n\n -- Emit waiting event (wait..ing@token)\n redis.call(\"PUBLISH\", KEYS[4] .. \"ing@\" .. ARGV[3], ARGV[1])\n return 1\n else\n return -2\n end\n else\n return -1\n end\nelse\n return 0\nend\n",
"sha": "5086cd33de5044080dd8fe6727c49bd2cc287e5e",
"numberOfKeys": 4,
"keyPrefix": ""
},
"retryJob": {
"lua": "--[[\n Retries a failed job by moving it back to the wait queue.\n\n Input:\n KEYS[1] 'active',\n KEYS[2] 'wait'\n KEYS[3] jobId\n\n ARGV[1] pushCmd\n ARGV[2] jobId\n ARGV[3] token\n\n Events:\n 'prefix:added'\n\n Output:\n 0 - OK\n -1 - Missing key\n -2 - Job Not locked\n]]\nif redis.call(\"EXISTS\", KEYS[3]) == 1 then\n\n -- Check for job lock\n if ARGV[3] \\x7e= \"0\" then\n local lockKey = KEYS[3] .. ':lock'\n local lock = redis.call(\"GET\", lockKey)\n if redis.call(\"GET\", lockKey) ~= ARGV[3] then\n return -2\n end\n end\n\n redis.call(\"LREM\", KEYS[1], 0, ARGV[2])\n redis.call(ARGV[1], KEYS[2], ARGV[2])\n\n return 0\nelse\n return -1\nend\n",
"sha": "994d9d7c16725b3c04eaabd5f268233bfc7e198d",
"numberOfKeys": 3,
"keyPrefix": ""
},
"takeLock": {
"lua": "--[[\n Takes a lock\n\n Input:\n KEYS[1] 'lock',\n \n ARGV[1] token\n ARGV[2] lock duration in milliseconds\n \n Output:\n \"OK\" if lock extented succesfully.\n]]\nif redis.call(\"SET\", KEYS[1], ARGV[1], \"NX\", \"PX\", ARGV[2]) then\n return 1\nelse\n return 0\nend\n",
"sha": "aaacb270f3dcdd05cf29c25c65fd23020a035537",
"numberOfKeys": 1,
"keyPrefix": ""
},
"updateDelaySet": {
"lua": "--[[\n Updates the delay set, by picking a delayed job that should\n be processed now.\n\n Input:\n KEYS[1] 'delayed'\n KEYS[2] 'active'\n KEYS[3] 'wait'\n\n ARGV[1] queue.toKey('')\n ARGV[2] delayed timestamp\n\n Events:\n 'removed'\n]]\nlocal RESULT = redis.call(\"ZRANGE\", KEYS[1], 0, 0, \"WITHSCORES\")\nlocal jobId = RESULT[1]\nlocal score = RESULT[2]\nif (score \\x7e= nil) then\n score = score / 0x1000\n if (math.floor(score) <= tonumber(ARGV[2])) then\n redis.call(\"ZREM\", KEYS[1], jobId)\n redis.call(\"LREM\", KEYS[2], 0, jobId)\n redis.call(\"LPUSH\", KEYS[3], jobId)\n redis.call(\"HSET\", ARGV[1] .. jobId, \"delay\", 0)\n local nextTimestamp = redis.call(\"ZRANGE\", KEYS[1], 0, 0, \"WITHSCORES\")[2]\n if(nextTimestamp ~= nil) then\n nextTimestamp = nextTimestamp / 0x1000\n redis.call(\"PUBLISH\", KEYS[1], nextTimestamp)\n end\n return nextTimestamp\n end\n return score\nend\n",
"sha": "f217e2fcd686145259976ac094161e6902d88654",
"numberOfKeys": 3,
"keyPrefix": ""
},
"updateProgress": {
"lua": "--[[\n Update job progress\n\n Input:\n KEYS[1] Job id key\n KEYS[2] progress event key\n \n ARGV[1] progress\n ARGV[2] event data\n\n Event:\n progress(jobId, progress)\n]]\nredis.call(\"HSET\", KEYS[1], \"progress\", ARGV[1])\nredis.call(\"PUBLISH\", KEYS[2], ARGV[2])\n",
"sha": "dabbb2936c9094b642797567a5bb872ad562cf9b",
"numberOfKeys": 2,
"keyPrefix": ""
}
},
"commandQueue": {
"_list": [
null,
null,
null,
null
],
"_capacityMask": 3,
"_head": 0,
"_tail": 0
},
"offlineQueue": {
"_list": [
null,
null,
null,
null
],
"_capacityMask": 3,
"_head": 0,
"_tail": 0
},
"connector": {
"options": "~queue~clients~0~options",
"connecting": true,
"stream": {
"connecting": false,
"_hadError": false,
"_handle": {
"bytesRead": 7140,
"_externalStream": {},
"fd": 34,
"reading": true,
"owner": "~queue~clients~0~connector~stream",
"onconnection": null,
"writeQueueSize": 0
},
"_parent": null,
"_host": "redis.patrikx3.com",
"_readableState": {
"objectMode": false,
"highWaterMark": 16384,
"buffer": {
"head": null,
"tail": null,
"length": 0
},
"length": 0,
"pipes": null,
"pipesCount": 0,
"flowing": true,
"ended": false,
"endEmitted": false,
"reading": true,
"sync": false,
"needReadable": true,
"emittedReadable": false,
"readableListening": false,
"resumeScheduled": false,
"destroyed": false,
"defaultEncoding": "utf8",
"awaitDrain": 0,
"readingMore": false,
"decoder": null,
"encoding": null
},
"readable": true,
"domain": null,
"_events": {},
"_eventsCount": 7,
"_writableState": {
"objectMode": false,
"highWaterMark": 16384,
"finalCalled": false,
"needDrain": false,
"ending": false,
"ended": false,
"finished": false,
"destroyed": false,
"decodeStrings": false,
"defaultEncoding": "utf8",
"length": 0,
"writing": false,
"corked": 0,
"sync": false,
"bufferProcessing": false,
"writecb": null,
"writelen": 0,
"bufferedRequest": null,
"lastBufferedRequest": null,
"pendingcb": 0,
"prefinished": false,
"errorEmitted": false,
"bufferedRequestCount": 0,
"corkedRequestsFree": {
"next": null,
"entry": null
}
},
"writable": true,
"allowHalfOpen": false,
"_bytesDispatched": 9627,
"_sockname": null,
"_pendingData": null,
"_pendingEncoding": "",
"server": null,
"_server": null,
"_idleTimeout": -1,
"_idleNext": null,
"_idlePrev": null,
"_idleStart": 834,
"_destroyed": false,
"_consuming": true,
"_peername": {
"address": "192.168.78.20",
"family": "IPv4",
"port": 6379
}
}
},
"retryAttempts": 0,
"status": "ready",
"condition": {
"select": 2,
"auth": "UcHejl1zkGJgqnQVOIDbhrgnRWdSkrNIiTwghb5z0PXU8IMgYLeGndIQQgqICzi7ioGtE4Qt4LhFPGuUiDRRnxPgcrxviEFVImyR92NuboeUQZDsjGStXh4tq3tBD554",
"subscriber": false
},
"stream": "~queue~clients~0~connector~stream",
"replyParser": {
"optionReturnBuffers": true,
"optionStringNumbers": false,
"name": "javascript",
"offset": 858,
"buffer": null,
"bigStrSize": 0,
"bigOffset": 0,
"totalChunkSize": 0,
"bufferCache": [],
"arrayCache": [],
"arrayPos": []
},
"serverInfo": {
"redis_version": "4.0.1",
"redis_git_sha1": "00000000",
"redis_git_dirty": "0",
"redis_build_id": "6f05deda2aff122a",
"redis_mode": "standalone",
"os": "Linux 4.12.0-1-amd64 x86_64",
"arch_bits": "64",
"multiplexing_api": "epoll",
"atomicvar_api": "atomic-builtin",
"gcc_version": "7.1.0",
"process_id": "726",
"run_id": "613da54a3f3ef2d4cd7599bb5e445911a04a751b",
"tcp_port": "6379",
"uptime_in_seconds": "50507",
"uptime_in_days": "0",
"hz": "10",
"lru_clock": "10390471",
"executable": "/usr/bin/redis-server",
"config_file": "/etc/redis/redis.conf",
"connected_clients": "18",
"client_longest_output_list": "0",
"client_biggest_input_buf": "0",
"blocked_clients": "0",
"used_memory": "3159920",
"used_memory_human": "3.01M",
"used_memory_rss": "5607424",
"used_memory_rss_human": "5.35M",
"used_memory_peak": "4375688",
"used_memory_peak_human": "4.17M",
"used_memory_peak_perc": "72.22%",
"used_memory_overhead": "1225422",
"used_memory_startup": "761640",
"used_memory_dataset": "1934498",
"used_memory_dataset_perc": "80.66%",
"total_system_memory": "8065531904",
"total_system_memory_human": "7.51G",
"used_memory_lua": "63488",
"used_memory_lua_human": "62.00K",
"maxmemory": "0",
"maxmemory_human": "0B",
"maxmemory_policy": "noeviction",
"mem_fragmentation_ratio": "1.77",
"mem_allocator": "jemalloc-3.6.0",
"active_defrag_running": "0",
"lazyfree_pending_objects": "0",
"loading": "0",
"rdb_changes_since_last_save": "88",
"rdb_bgsave_in_progress": "0",
"rdb_last_save_time": "1503562564",
"rdb_last_bgsave_status": "ok",
"rdb_last_bgsave_time_sec": "0",
"rdb_current_bgsave_time_sec": "-1",
"rdb_last_cow_size": "573440",
"aof_enabled": "0",
"aof_rewrite_in_progress": "0",
"aof_rewrite_scheduled": "0",
"aof_last_rewrite_time_sec": "-1",
"aof_current_rewrite_time_sec": "-1",
"aof_last_bgrewrite_status": "ok",
"aof_last_write_status": "ok",
"aof_last_cow_size": "0",
"total_connections_received": "1939",
"total_commands_processed": "429123",
"instantaneous_ops_per_sec": "0",
"total_net_input_bytes": "53934509",
"total_net_output_bytes": "82492442",
"instantaneous_input_kbps": "0.00",
"instantaneous_output_kbps": "0.00",
"rejected_connections": "0",
"sync_full": "0",
"sync_partial_ok": "0",
"sync_partial_err": "0",
"expired_keys": "15961",
"evicted_keys": "0",
"keyspace_hits": "63470",
"keyspace_misses": "120894",
"pubsub_channels": "5",
"pubsub_patterns": "0",
"latest_fork_usec": "369",
"migrate_cached_sockets": "0",
"slave_expires_tracked_keys": "0",
"active_defrag_hits": "0",
"active_defrag_misses": "0",
"active_defrag_key_hits": "0",
"active_defrag_key_misses": "0",
"role": "master",
"connected_slaves": "0",
"master_replid": "4f73aa9dfe6ff5d143ef3413ee8ba3ea0366c09f",
"master_replid2": "0000000000000000000000000000000000000000",
"master_repl_offset": "0",
"second_repl_offset": "-1",
"repl_backlog_active": "0",
"repl_backlog_size": "1048576",
"repl_backlog_first_byte_offset": "0",
"repl_backlog_histlen": "0",
"used_cpu_sys": "54.08",
"used_cpu_user": "31.31",
"used_cpu_sys_children": "0.41",
"used_cpu_user_children": "1.77",
"cluster_enabled": "0",
"db0": "keys=33,expires=32,avg_ttl=171656210",
"db1": "keys=391,expires=80,avg_ttl=547768536",
"db2": "keys=52,expires=9,avg_ttl=9882",
"db4": "keys=6,expires=6,avg_ttl=911918"
}
},
{
"options": {
"password": "UcHejl1zkGJgqnQVOIDbhrgnRWdSkrNIiTwghb5z0PXU8IMgYLeGndIQQgqICzi7ioGtE4Qt4LhFPGuUiDRRnxPgcrxviEFVImyR92NuboeUQZDsjGStXh4tq3tBD554",
"db": 2,
"host": "redis.patrikx3.com",
"port": 6379,
"family": 4,
"connectTimeout": 10000,
"keepAlive": 0,
"noDelay": true,
"connectionName": null,
"sentinels": null,
"name": null,
"role": "master",
"dropBufferSupport": false,
"enableOfflineQueue": true,
"enableReadyCheck": true,
"autoResubscribe": true,
"autoResendUnfulfilledCommands": true,
"lazyConnect": false,
"keyPrefix": "",
"reconnectOnError": null,
"readOnly": false,
"stringNumbers": false,
"showFriendlyErrorStack": false
},
"domain": null,
"_events": {},
"_eventsCount": 3,
"scriptsSet": {},
"commandQueue": {
"_list": [
null,
null,
null,
null
],
"_capacityMask": 3,
"_head": 0,
"_tail": 0
},
"offlineQueue": {
"_list": [
null,
null,
null,
null
],
"_capacityMask": 3,
"_head": 0,
"_tail": 0
},
"connector": {
"options": "~queue~clients~1~options",
"connecting": true,
"stream": {
"connecting": false,
"_hadError": false,
"_handle": {
"bytesRead": 2947,
"_externalStream": {},
"fd": 15,
"reading": true,
"owner": "~queue~clients~1~connector~stream",
"onconnection": null,
"writeQueueSize": 0
},
"_parent": null,
"_host": "redis.patrikx3.com",
"_readableState": {
"objectMode": false,
"highWaterMark": 16384,
"buffer": {
"head": null,
"tail": null,
"length": 0
},
"length": 0,
"pipes": null,
"pipesCount": 0,
"flowing": true,
"ended": false,
"endEmitted": false,
"reading": true,
"sync": false,
"needReadable": true,
"emittedReadable": false,
"readableListening": false,
"resumeScheduled": false,
"destroyed": false,
"defaultEncoding": "utf8",
"awaitDrain": 0,
"readingMore": false,
"decoder": null,
"encoding": null
},
"readable": true,
"domain": null,
"_events": {},
"_eventsCount": 7,
"_writableState": {
"objectMode": false,
"highWaterMark": 16384,
"finalCalled": false,
"needDrain": false,
"ending": false,
"ended": false,
"finished": false,
"destroyed": false,
"decodeStrings": false,
"defaultEncoding": "utf8",
"length": 0,
"writing": false,
"corked": 0,
"sync": false,
"bufferProcessing": false,
"writecb": null,
"writelen": 0,
"bufferedRequest": null,
"lastBufferedRequest": null,
"pendingcb": 0,
"prefinished": false,
"errorEmitted": false,
"bufferedRequestCount": 0,
"corkedRequestsFree": {
"next": null,
"entry": null
}
},
"writable": true,
"allowHalfOpen": false,
"_bytesDispatched": 248,
"_sockname": null,
"_pendingData": null,
"_pendingEncoding": "",
"server": null,
"_server": null,
"_idleTimeout": -1,
"_idleNext": null,
"_idlePrev": null,
"_idleStart": 846,
"_destroyed": false,
"_consuming": true,
"_peername": {
"address": "192.168.78.20",
"family": "IPv4",
"port": 6379
}
}
},
"retryAttempts": 0,
"status": "ready",
"condition": {
"select": 2,
"auth": "UcHejl1zkGJgqnQVOIDbhrgnRWdSkrNIiTwghb5z0PXU8IMgYLeGndIQQgqICzi7ioGtE4Qt4LhFPGuUiDRRnxPgcrxviEFVImyR92NuboeUQZDsjGStXh4tq3tBD554",
"subscriber": {
"set": {
"subscribe": {
"bull:corifeus-app-web-pages:delayed": true
},
"psubscribe": {}
}
}
},
"stream": "~queue~clients~1~connector~stream",
"replyParser": {
"optionReturnBuffers": true,
"optionStringNumbers": false,
"name": "javascript",
"offset": 65,
"buffer": null,
"bigStrSize": 0,
"bigOffset": 0,
"totalChunkSize": 0,
"bufferCache": [],
"arrayCache": [],
"arrayPos": []
},
"serverInfo": {
"redis_version": "4.0.1",
"redis_git_sha1": "00000000",
"redis_git_dirty": "0",
"redis_build_id": "6f05deda2aff122a",
"redis_mode": "standalone",
"os": "Linux 4.12.0-1-amd64 x86_64",
"arch_bits": "64",
"multiplexing_api": "epoll",
"atomicvar_api": "atomic-builtin",
"gcc_version": "7.1.0",
"process_id": "726",
"run_id": "613da54a3f3ef2d4cd7599bb5e445911a04a751b",
"tcp_port": "6379",
"uptime_in_seconds": "50507",
"uptime_in_days": "0",
"hz": "10",
"lru_clock": "10390471",
"executable": "/usr/bin/redis-server",
"config_file": "/etc/redis/redis.conf",
"connected_clients": "27",
"client_longest_output_list": "0",
"client_biggest_input_buf": "0",
"blocked_clients": "0",
"used_memory": "3680616",
"used_memory_human": "3.51M",
"used_memory_rss": "5607424",
"used_memory_rss_human": "5.35M",
"used_memory_peak": "4375688",
"used_memory_peak_human": "4.17M",
"used_memory_peak_perc": "84.12%",
"used_memory_overhead": "1672092",
"used_memory_startup": "761640",
"used_memory_dataset": "2008524",
"used_memory_dataset_perc": "68.81%",
"total_system_memory": "8065531904",
"total_system_memory_human": "7.51G",
"used_memory_lua": "69632",
"used_memory_lua_human": "68.00K",
"maxmemory": "0",
"maxmemory_human": "0B",
"maxmemory_policy": "noeviction",
"mem_fragmentation_ratio": "1.52",
"mem_allocator": "jemalloc-3.6.0",
"active_defrag_running": "0",
"lazyfree_pending_objects": "0",
"loading": "0",
"rdb_changes_since_last_save": "88",
"rdb_bgsave_in_progress": "0",
"rdb_last_save_time": "1503562564",
"rdb_last_bgsave_status": "ok",
"rdb_last_bgsave_time_sec": "0",
"rdb_current_bgsave_time_sec": "-1",
"rdb_last_cow_size": "573440",
"aof_enabled": "0",
"aof_rewrite_in_progress": "0",
"aof_rewrite_scheduled": "0",
"aof_last_rewrite_time_sec": "-1",
"aof_current_rewrite_time_sec": "-1",
"aof_last_bgrewrite_status": "ok",
"aof_last_write_status": "ok",
"aof_last_cow_size": "0",
"total_connections_received": "1948",
"total_commands_processed": "429216",
"instantaneous_ops_per_sec": "0",
"total_net_input_bytes": "53938354",
"total_net_output_bytes": "82544313",
"instantaneous_input_kbps": "0.00",
"instantaneous_output_kbps": "0.00",
"rejected_connections": "0",
"sync_full": "0",
"sync_partial_ok": "0",
"sync_partial_err": "0",
"expired_keys": "15961",
"evicted_keys": "0",
"keyspace_hits": "63491",
"keyspace_misses": "120897",
"pubsub_channels": "5",
"pubsub_patterns": "0",
"latest_fork_usec": "369",
"migrate_cached_sockets": "0",
"slave_expires_tracked_keys": "0",
"active_defrag_hits": "0",
"active_defrag_misses": "0",
"active_defrag_key_hits": "0",
"active_defrag_key_misses": "0",
"role": "master",
"connected_slaves": "0",
"master_replid": "4f73aa9dfe6ff5d143ef3413ee8ba3ea0366c09f",
"master_replid2": "0000000000000000000000000000000000000000",
"master_repl_offset": "0",
"second_repl_offset": "-1",
"repl_backlog_active": "0",
"repl_backlog_size": "1048576",
"repl_backlog_first_byte_offset": "0",
"repl_backlog_histlen": "0",
"used_cpu_sys": "54.09",
"used_cpu_user": "31.31",
"used_cpu_sys_children": "0.41",
"used_cpu_user_children": "1.77",
"cluster_enabled": "0",
"db0": "keys=33,expires=32,avg_ttl=171656210",
"db1": "keys=391,expires=80,avg_ttl=547768536",
"db2": "keys=52,expires=9,avg_ttl=9882",
"db4": "keys=6,expires=6,avg_ttl=911918"
}
},
{
"options": {
"password": "UcHejl1zkGJgqnQVOIDbhrgnRWdSkrNIiTwghb5z0PXU8IMgYLeGndIQQgqICzi7ioGtE4Qt4LhFPGuUiDRRnxPgcrxviEFVImyR92NuboeUQZDsjGStXh4tq3tBD554",
"db": 2,
"host": "redis.patrikx3.com",
"port": 6379,
"family": 4,
"connectTimeout": 10000,
"keepAlive": 0,
"noDelay": true,
"connectionName": null,
"sentinels": null,
"name": null,
"role": "master",
"dropBufferSupport": false,
"enableOfflineQueue": true,
"enableReadyCheck": true,
"autoResubscribe": true,
"autoResendUnfulfilledCommands": true,
"lazyConnect": false,
"keyPrefix": "",
"reconnectOnError": null,
"readOnly": false,
"stringNumbers": false,
"showFriendlyErrorStack": false
},
"domain": null,
"_events": {},
"_eventsCount": 1,
"scriptsSet": {},
"commandQueue": {
"_list": [
null,
null,
null,
null
],
"_capacityMask": 3,
"_head": 3,
"_tail": 3
},
"offlineQueue": {
"_list": [
null,
null,
null,
null
],
"_capacityMask": 3,
"_head": 0,
"_tail": 0
},
"connector": {
"options": "~queue~clients~2~options",
"connecting": true,
"stream": {
"connecting": false,
"_hadError": false,
"_handle": {
"bytesRead": 2929,
"_externalStream": {},
"fd": 24,
"reading": true,
"owner": "~queue~clients~2~connector~stream",
"onconnection": null,
"writeQueueSize": 0
},
"_parent": null,
"_host": "redis.patrikx3.com",
"_readableState": {
"objectMode": false,
"highWaterMark": 16384,
"buffer": {
"head": null,
"tail": null,
"length": 0
},
"length": 0,
"pipes": null,
"pipesCount": 0,
"flowing": true,
"ended": false,
"endEmitted": false,
"reading": true,
"sync": false,
"needReadable": true,
"emittedReadable": false,
"readableListening": false,
"resumeScheduled": false,
"destroyed": false,
"defaultEncoding": "utf8",
"awaitDrain": 0,
"readingMore": false,
"decoder": null,
"encoding": null
},
"readable": true,
"domain": null,
"_events": {},
"_eventsCount": 7,
"_writableState": {
"objectMode": false,
"highWaterMark": 16384,
"finalCalled": false,
"needDrain": false,
"ending": false,
"ended": false,
"finished": false,
"destroyed": false,
"decodeStrings": false,
"defaultEncoding": "utf8",
"length": 0,
"writing": false,
"corked": 0,
"sync": false,
"bufferProcessing": false,
"writecb": null,
"writelen": 0,
"bufferedRequest": null,
"lastBufferedRequest": null,
"pendingcb": 0,
"prefinished": false,
"errorEmitted": false,
"bufferedRequestCount": 0,
"corkedRequestsFree": {
"next": null,
"entry": null
}
},
"writable": true,
"allowHalfOpen": false,
"_bytesDispatched": 1051,
"_sockname": null,
"_pendingData": null,
"_pendingEncoding": "",
"server": null,
"_server": null,
"_idleTimeout": -1,
"_idleNext": null,
"_idlePrev": null,
"_idleStart": 856,
"_destroyed": false,
"_consuming": true,
"_peername": {
"address": "192.168.78.20",
"family": "IPv4",
"port": 6379
}
}
},
"retryAttempts": 0,
"status": "ready",
"condition": {
"select": 2,
"auth": "UcHejl1zkGJgqnQVOIDbhrgnRWdSkrNIiTwghb5z0PXU8IMgYLeGndIQQgqICzi7ioGtE4Qt4LhFPGuUiDRRnxPgcrxviEFVImyR92NuboeUQZDsjGStXh4tq3tBD554",
"subscriber": false
},
"stream": "~queue~clients~2~connector~stream",
"replyParser": {
"optionReturnBuffers": true,
"optionStringNumbers": false,
"name": "javascript",
"offset": 8,
"buffer": null,
"bigStrSize": 0,
"bigOffset": 0,
"totalChunkSize": 0,
"bufferCache": [],
"arrayCache": [],
"arrayPos": []
},
"serverInfo": {
"redis_version": "4.0.1",
"redis_git_sha1": "00000000",
"redis_git_dirty": "0",
"redis_build_id": "6f05deda2aff122a",
"redis_mode": "standalone",
"os": "Linux 4.12.0-1-amd64 x86_64",
"arch_bits": "64",
"multiplexing_api": "epoll",
"atomicvar_api": "atomic-builtin",
"gcc_version": "7.1.0",
"process_id": "726",
"run_id": "613da54a3f3ef2d4cd7599bb5e445911a04a751b",
"tcp_port": "6379",
"uptime_in_seconds": "50507",
"uptime_in_days": "0",
"hz": "10",
"lru_clock": "10390471",
"executable": "/usr/bin/redis-server",
"config_file": "/etc/redis/redis.conf",
"connected_clients": "36",
"client_longest_output_list": "0",
"client_biggest_input_buf": "0",
"blocked_clients": "0",
"used_memory": "4203088",
"used_memory_human": "4.01M",
"used_memory_rss": "5607424",
"used_memory_rss_human": "5.35M",
"used_memory_peak": "4375688",
"used_memory_peak_human": "4.17M",
"used_memory_peak_perc": "96.06%",
"used_memory_overhead": "2118762",
"used_memory_startup": "761640",
"used_memory_dataset": "2084326",
"used_memory_dataset_perc": "60.57%",
"total_system_memory": "8065531904",
"total_system_memory_human": "7.51G",
"used_memory_lua": "84992",
"used_memory_lua_human": "83.00K",
"maxmemory": "0",
"maxmemory_human": "0B",
"maxmemory_policy": "noeviction",
"mem_fragmentation_ratio": "1.33",
"mem_allocator": "jemalloc-3.6.0",
"active_defrag_running": "0",
"lazyfree_pending_objects": "0",
"loading": "0",
"rdb_changes_since_last_save": "88",
"rdb_bgsave_in_progress": "0",
"rdb_last_save_time": "1503562564",
"rdb_last_bgsave_status": "ok",
"rdb_last_bgsave_time_sec": "0",
"rdb_current_bgsave_time_sec": "-1",
"rdb_last_cow_size": "573440",
"aof_enabled": "0",
"aof_rewrite_in_progress": "0",
"aof_rewrite_scheduled": "0",
"aof_last_rewrite_time_sec": "-1",
"aof_current_rewrite_time_sec": "-1",
"aof_last_bgrewrite_status": "ok",
"aof_last_write_status": "ok",
"aof_last_cow_size": "0",
"total_connections_received": "1957",
"total_commands_processed": "429306",
"instantaneous_ops_per_sec": "0",
"total_net_input_bytes": "53949525",
"total_net_output_bytes": "82570976",
"instantaneous_input_kbps": "0.00",
"instantaneous_output_kbps": "0.00",
"rejected_connections": "0",
"sync_full": "0",
"sync_partial_ok": "0",
"sync_partial_err": "0",
"expired_keys": "15961",
"evicted_keys": "0",
"keyspace_hits": "63491",
"keyspace_misses": "120906",
"pubsub_channels": "14",
"pubsub_patterns": "0",
"latest_fork_usec": "369",
"migrate_cached_sockets": "0",
"slave_expires_tracked_keys": "0",
"active_defrag_hits": "0",
"active_defrag_misses": "0",
"active_defrag_key_hits": "0",
"active_defrag_key_misses": "0",
"role": "master",
"connected_slaves": "0",
"master_replid": "4f73aa9dfe6ff5d143ef3413ee8ba3ea0366c09f",
"master_replid2": "0000000000000000000000000000000000000000",
"master_repl_offset": "0",
"second_repl_offset": "-1",
"repl_backlog_active": "0",
"repl_backlog_size": "1048576",
"repl_backlog_first_byte_offset": "0",
"repl_backlog_histlen": "0",
"used_cpu_sys": "54.09",
"used_cpu_user": "31.31",
"used_cpu_sys_children": "0.41",
"used_cpu_user_children": "1.77",
"cluster_enabled": "0",
"db0": "keys=33,expires=32,avg_ttl=171656210",
"db1": "keys=391,expires=80,avg_ttl=547768536",
"db2": "keys=52,expires=9,avg_ttl=9882",
"db4": "keys=6,expires=6,avg_ttl=911918"
}
}
],
"_initializing": {
"isFulfilled": true,
"isRejected": false
},
"handlers": {},
"processing": [
{
"isFulfilled": false,
"isRejected": false
}
],
"retrieving": 0,
"settings": {
"lockDuration": 300000,
"lockRenewTime": 150000,
"stalledInterval": 30000,
"maxStalledCount": 1,
"guardInterval": 5000,
"retryProcessDelay": 5000,
"drainDelay": 5
},
"_events": {
"error": [
null,
null
]
},
"_eventsCount": 3,
"timers": {
"idle": true,
"listeners": [],
"timers": {}
},
"keys": {
"": "bull:corifeus-app-web-pages:",
"wait": "bull:corifeus-app-web-pages:wait",
"paused": "bull:corifeus-app-web-pages:paused",
"meta-paused": "bull:corifeus-app-web-pages:meta-paused",
"active": "bull:corifeus-app-web-pages:active",
"id": "bull:corifeus-app-web-pages:id",
"delayed": "bull:corifeus-app-web-pages:delayed",
"priority": "bull:corifeus-app-web-pages:priority",
"stalled-check": "bull:corifeus-app-web-pages:stalled-check",
"completed": "bull:corifeus-app-web-pages:completed",
"failed": "bull:corifeus-app-web-pages:failed",
"stalled": "bull:corifeus-app-web-pages:stalled"
},
"delayedTimestamp": 1.7976931348623157e+308,
"_initializingProcess": {
"isFulfilled": true,
"isRejected": false
},
"errorRetryTimer": {},
"registeredEvents": {
"delayed": {
"isFulfilled": true,
"isRejected": false,
"fulfillmentValue": 1
}
},
"guardianTimer": {
"_called": true,
"_idleTimeout": 5000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 5000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 5000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 5000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 5000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 5000,
"_idlePrev": {
"_idleNext": "~queue~guardianTimer~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev",
"_idlePrev": {
"_called": true,
"_idleTimeout": 5000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 5000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 5000,
"_idlePrev": "~queue~guardianTimer",
"_idleNext": "~queue~guardianTimer~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev",
"_idleStart": 85887,
"_repeat": 5000,
"_destroyed": false
},
"_idleNext": "~queue~guardianTimer~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev",
"_idleStart": 85887,
"_repeat": 5000,
"_destroyed": false
},
"_idleNext": "~queue~guardianTimer~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev",
"_idleStart": 85886,
"_repeat": 5000,
"_destroyed": false
},
"_timer": {
"_list": "~queue~guardianTimer~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev"
},
"_unrefed": false,
"msecs": 5000,
"nextTick": false
},
"_idleNext": "~queue~guardianTimer~_idlePrev~_idlePrev~_idlePrev~_idlePrev",
"_idleStart": 85889,
"_repeat": 5000,
"_destroyed": false
},
"_idleNext": "~queue~guardianTimer~_idlePrev~_idlePrev~_idlePrev",
"_idleStart": 85887,
"_repeat": 5000,
"_destroyed": false
},
"_idleNext": "~queue~guardianTimer~_idlePrev~_idlePrev",
"_idleStart": 85887,
"_repeat": 5000,
"_destroyed": false
},
"_idleNext": "~queue~guardianTimer~_idlePrev",
"_idleStart": 85887,
"_repeat": 5000,
"_destroyed": false
},
"_idleNext": "~queue~guardianTimer",
"_idleStart": 85887,
"_repeat": 5000,
"_destroyed": false
},
"_idleNext": "~queue~guardianTimer~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev",
"_idleStart": 85887,
"_repeat": 5000,
"_destroyed": false
},
"moveUnlockedJobsToWaitInterval": {
"_called": true,
"_idleTimeout": 30000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 30000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 30000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 30000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 30000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 30000,
"_idlePrev": {
"_idleNext": "~queue~moveUnlockedJobsToWaitInterval~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev",
"_idlePrev": {
"_called": true,
"_idleTimeout": 30000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 30000,
"_idlePrev": {
"_called": true,
"_idleTimeout": 30000,
"_idlePrev": "~queue~moveUnlockedJobsToWaitInterval",
"_idleNext": "~queue~moveUnlockedJobsToWaitInterval~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev",
"_idleStart": 90860,
"_repeat": 30000,
"_destroyed": false
},
"_idleNext": "~queue~moveUnlockedJobsToWaitInterval~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev",
"_idleStart": 90860,
"_repeat": 30000,
"_destroyed": false
},
"_idleNext": "~queue~moveUnlockedJobsToWaitInterval~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev",
"_idleStart": 90859,
"_repeat": 30000,
"_destroyed": false
},
"_timer": {
"_list": "~queue~moveUnlockedJobsToWaitInterval~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev"
},
"_unrefed": false,
"msecs": 30000,
"nextTick": false
},
"_idleNext": "~queue~moveUnlockedJobsToWaitInterval~_idlePrev~_idlePrev~_idlePrev~_idlePrev",
"_idleStart": 90861,
"_repeat": 30000,
"_destroyed": false
},
"_idleNext": "~queue~moveUnlockedJobsToWaitInterval~_idlePrev~_idlePrev~_idlePrev",
"_idleStart": 90861,
"_repeat": 30000,
"_destroyed": false
},
"_idleNext": "~queue~moveUnlockedJobsToWaitInterval~_idlePrev~_idlePrev",
"_idleStart": 90861,
"_repeat": 30000,
"_destroyed": false
},
"_idleNext": "~queue~moveUnlockedJobsToWaitInterval~_idlePrev",
"_idleStart": 90861,
"_repeat": 30000,
"_destroyed": false
},
"_idleNext": "~queue~moveUnlockedJobsToWaitInterval",
"_idleStart": 90860,
"_repeat": 30000,
"_destroyed": false
},
"_idleNext": "~queue~moveUnlockedJobsToWaitInterval~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev~_idlePrev",
"_idleStart": 90860,
"_repeat": 30000,
"_destroyed": false
},
"drained": true
},
"data": {
"dry": false,
"local": true,
"body": {
"cwd": "/var/git/corifeus-app-web-pages.git",
"deploy": true
},
"name": "corifeus-app-web-pages"
},
"_progress": 0,
"delay": 0,
"stacktrace": [],
"attemptsMade": 0,
"id": "30",
"finishedOn": 1503562762696,
"processedOn": 1503562785371
}
If you are on rc8, please upgrade to rc9 we had a critical issue related to stalled jobs on rc8.
works, thanks so much!
FYI: you have your redis credentials in plaintext in the page. Maybe consider changing that? @p3x-robot
by now it works.
I mean your redis server and password are available for everyone to see here. If I were you I'd change the password if you haven't already changed it.