Skip to content

Commit

Permalink
Add app.queues.configuration.workerCount
Browse files Browse the repository at this point in the history
  • Loading branch information
m-barthelemy authored Aug 17, 2020
1 parent e5f426d commit f9e46bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ queue.list(queue: "myCustomQueue")
## Caveats


### Polling interval
### Polling interval and number of workers
By default, the Vapor Queues package creates 2 workers per CPU core, and each worker would periodically poll the database for jobs to be run.
On a recent 4 cores MacBook, this means 8 workers querying the database every second by default.

Expand All @@ -135,6 +135,8 @@ You can change the jobs polling interval by calling:
app.queues.configuration.refreshInterval = .seconds(custom_value)
```

With Queues >=1.4.0, you can also configure the number of workers that will be started by setting `app.queues.configuration.workerCount`


### Soft Deletes
By default, this driver uses Fluent's "soft delete" feature, meaning that completed jobs stay in the database, but with a non-null `deleted_at` value.
Expand Down

0 comments on commit f9e46bb

Please sign in to comment.