Skip to content

Commit 7467256

Browse files
codazzojbielick
authored andcommitted
Let docs for Worker.options mention timeout option
Instead of `shutdownTimeout`, which is only used internally as a private property of `Worker`.
1 parent 82d7617 commit 7467256

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

docs/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ started per-process.
711711
| [options] | <code>object</code> | | |
712712
| [options.wid] | <code>String</code> | <code>uuid().slice(0, 8)</code> | the wid the worker will use |
713713
| [options.concurrency] | <code>Number</code> | <code>20</code> | how many jobs this worker can process at once |
714-
| [options.shutdownTimeout] | <code>Number</code> | <code>8</code> | the amount of time in seconds that the worker may take to finish a job before exiting ungracefully |
714+
| [options.timeout] | <code>Number</code> | <code>8</code> | the amount of time in seconds that the worker may take to finish a job before exiting ungracefully |
715715
| [options.beatInterval] | <code>Number</code> | <code>15</code> | the amount of time in seconds between each heartbeat |
716716
| [options.queues] | <code>Array.&lt;string&gt;</code> | <code>[&#x27;default&#x27;]</code> | the queues this worker will fetch jobs from |
717717
| [options.middleware] | <code>Array.&lt;function()&gt;</code> | <code>[]</code> | a set of middleware to run before performing each job in koa.js-style middleware execution signature |

src/worker.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ export class Worker extends EventEmitter {
7979
* @param {object} [options]
8080
* @param {String} [options.wid=uuid().slice(0, 8)]: the wid the worker will use
8181
* @param {Number} [options.concurrency=20]: how many jobs this worker can process at once
82-
* @param {Number} [options.shutdownTimeout=8]: the amount of time in seconds that the worker
83-
* may take to finish a job before exiting
84-
* ungracefully
82+
* @param {Number} [options.timeout=8]: the amount of time in seconds that the worker
83+
* may take to finish a job before exiting ungracefully
8584
* @param {Number} [options.beatInterval=15]: the amount of time in seconds between each
8685
* heartbeat
8786
* @param {string[]} [options.queues=['default']]: the queues this worker will fetch jobs from

0 commit comments

Comments
 (0)