Releases: actionhero/node-resque
v5.5.4
Add Atomic Scheduler Master Lock
Make setting the scheduler master lock and setting the expiration atomic. The SET command allows passing both an expiration and specifying to only set if the key doesn't exist.
Change the way custom modules are referenced
Instantiate the constructor properly
- by @ValeSauer via #279
v5.5.3
Gracefully & in-parallel stop multiworker
Now when multiworker is asked to stop, all workers are told to stop at the same time. This way, no worker can pick up a new job while waiting for the other workers to stop.
- #268
- by @alexsanya
Adding args property to job object when reEnqueue event was emitted
Misc
- Documentation updates about
worker.end
- dependencies updates and code format updated for latest ESLint version
v5.5.1: Relative require statements
v5.5.0: Scan vs Keys
v5.4.1: Allow namespace arrays
v5.4.0
- Ensure that the scheduler will not end until the current cycle is complete (by @jdwuarin via #251)
- Ensure that
queue#checkStuckWorkers
only clears workers which haven't been cleared by another process (by @jdwuarin via #251) - Relax the requirement to recover a job via forceCleanWorker. If we cannot recover the job/queues of the stuck job, still clear the worker (by @evantahler via #247)
v5.3.2: Fix an options issue for ioredis auth
v5.3.1
Use .database on connect
- use
options.database
with ioredis to select the database number when connectiong - by @BayanBennett via #241
Bugs Fixed:
- Fix multiworker to wait for all children to stop before exiting
- Only have scheduler poll for stuck workers once a cycle
v5.3.0: Worker Cleanup by Scheduler
Worker Cleanup by Scheduler
- remove
worker#workerCleanup
- scheduler cleans up workers which stop pinging.
By default, the scheduler will check for workers which haven't pinged redis in 60 minutes. If this happens, we will assume the process crashed, and remove it from redis. If this worker was working on a job, we will place it in the failed queue for later inspection. Every worker has a timer running in which it then updates a key in redis every timeout
(default: 5 seconds). If your job is slow, but async, there should be no problem. However, if your job consumes 100% of the CPU of the process, this timer might not fire.
To modify the 60 minute check, change stuckWorkerTimeout
when configuring your scheudler, ie:
const scheduler = new NodeResque.Scheduler({
stuckWorkerTimeout: (1000 * 60 * 60) // 1 hour, in ms
connection: connectionDetails
})
Set your scheduler's stuckWorkerTimeout = false
to disable this behavior.
const scheduler = new NodeResque.Scheduler({
stuckWorkerTimeout: false // will not fail jobs which haven't pinged redis
connection: connectionDetails
})
Jest
We now test this project with Jest, dropping mocha and should
Test Cleanup
Ensure that connections are properly closed in tests (and other node.js processes)
- Properly close all connections in test suite; prevent node app from shutdown 'hang'.
- Removed
toDisconnectProcessors
as a multiworker option, because it actually wasn't doing anything
(#235)
Misc
- update dependencies