Skip to content

Commit

Permalink
Let docs for Worker.options mention timeout option
Browse files Browse the repository at this point in the history
Instead of `shutdownTimeout`, which is only used internally as a private
property of `Worker`.
  • Loading branch information
codazzo authored and jbielick committed Oct 28, 2024
1 parent 82d7617 commit 7467256
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ started per-process.
| [options] | <code>object</code> | | |
| [options.wid] | <code>String</code> | <code>uuid().slice(0, 8)</code> | the wid the worker will use |
| [options.concurrency] | <code>Number</code> | <code>20</code> | how many jobs this worker can process at once |
| [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 |
| [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 |
| [options.beatInterval] | <code>Number</code> | <code>15</code> | the amount of time in seconds between each heartbeat |
| [options.queues] | <code>Array.&lt;string&gt;</code> | <code>[&#x27;default&#x27;]</code> | the queues this worker will fetch jobs from |
| [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 |
Expand Down
5 changes: 2 additions & 3 deletions src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ export class Worker extends EventEmitter {
* @param {object} [options]
* @param {String} [options.wid=uuid().slice(0, 8)]: the wid the worker will use
* @param {Number} [options.concurrency=20]: how many jobs this worker can process at once
* @param {Number} [options.shutdownTimeout=8]: the amount of time in seconds that the worker
* may take to finish a job before exiting
* ungracefully
* @param {Number} [options.timeout=8]: the amount of time in seconds that the worker
* may take to finish a job before exiting ungracefully
* @param {Number} [options.beatInterval=15]: the amount of time in seconds between each
* heartbeat
* @param {string[]} [options.queues=['default']]: the queues this worker will fetch jobs from
Expand Down

0 comments on commit 7467256

Please sign in to comment.