Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Morison authored and Chris Morison committed Mar 27, 2021
1 parent 46ae076 commit 54e8e51
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,25 +103,25 @@ The configuration object supports `date`, `in`, `on`, and `priority`, all of whi
```javascript
Jobs.configure({
// (milliseconds) specify how long the server could be inactive before another server
// takes on the master role (default = 5min)
maxWait: Number,
// takes on the master role (default = 5min)
maxWait: Number,

// (milliseconds) specify how long after server startup the package should start running
startupDelay: Number,
// (milliseconds) specify how long after server startup the package should start running
startupDelay: Number,

// determine how to set the serverId - see below. (default = random string)
setServerId: String || Function,
// determine how to set the serverId - see below. (default = random string)
setServerId: String || Function,

// determine if/how to log the package outputs (defalt = console.log)
log: Boolean || Function,
// determine if/how to log the package outputs (defalt = console.log)
log: Boolean || Function,

// specify if all job queues should start automatically on first launch (default = true)...
// ... after server relaunch the list of paused queues is restored from the database.
autoStart: Boolean,
// specify if all job queues should start automatically on first launch (default = true)...
// ... after server relaunch the list of paused queues is restored from the database.
autoStart: Boolean,

// whether to mark successfull just as successful, or remove them,
// otherwise you have to resolve every job with this.succesS() or this.remove()
defaultCompletion: 'success' | 'remove',
// whether to mark successfull just as successful, or remove them,
// otherwise you have to resolve every job with this.success() or this.remove()
defaultCompletion: 'success' | 'remove',
})
```
`setServerId` - In a **multi-server deployment**, jobs are only executed on one server. Each server should have a unique ID so that it knows if it is control of the job queue or not. You can provide a function which returns a serverId from somewhere (e.g. from an environment variable) or just use the default of a random string. In a **single-server deployment** set this to a static string so that the server knows that it is always in control and can take control more quickly after a reboot.
Expand Down Expand Up @@ -416,14 +416,14 @@ If any of these differences make this package unsuitable for you, please let me
## Version History

#### 1.0.11 (2021-03-28)
- Added the `'defaultCompletion'` [Jobs.configure](#jobsconfigure) option. Suggested in #10.
- Added the `'defaultCompletion'` [Jobs.configure](#jobsconfigure) option. Suggested in [#10](/issues/10).

#### 1.0.10 (2021-02-17)
- Better support for [Async Jobs/Promises](#async-jobs). Fixes #7.
- Better support for [Async Jobs/Promises](#async-jobs). Fixes [#7](/issues/5).
- While jobs are executing their status is set to `'executing'`.

#### 1.0.9 (2020-09-25)
- Capped timeout to 24 hours to avoid node limit. Fixes #5.
- Capped timeout to 24 hours to avoid node limit. Fixes [#5](/issues/7).

#### 1.0.8 (2019-09-27)
- Fix bug when using months to set the job time.
Expand Down

0 comments on commit 54e8e51

Please sign in to comment.