Skip to content

Commit

Permalink
WIP #1
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Apr 20, 2018
1 parent 862a299 commit 927afef
Show file tree
Hide file tree
Showing 12 changed files with 1,933 additions and 121 deletions.
7 changes: 5 additions & 2 deletions docs/SERVICES.MD
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ The `jobs` [service](https://docs.feathersjs.com/api/services.html) allow to man
The returned job object is a [promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) resolved or rejected when the job is finished or has failed.

Available job types are the following:
* `asyn` to run tasks in parallel by batch, available options are
* `async` to run tasks in parallel by batch, available options are
* **workersLimit**: the maximum number of tasks to be run in parallel by the job

* `kue` to run tasks by the [Kue job sequencer](https://github.com/Automattic/kue), available options are
* **workersLimit**: the maximum number of tasks to be processed in parallel by Kue
* **attemptsLimit**: the maximum number of attempts for a task before being declared as failed by Kue

#### Task templates

When creating a job if a `taskTemplate` object is provided it will be automatically merged in all job tasks so that you can use it to store options common to all your tasks. It also provides task ID [templating](https://lodash.com/docs/4.17.4#template) based on `jobId` and `taskId` injected variables. So if you provide the following task template:
Expand Down
5 changes: 4 additions & 1 deletion examples/adsb/jobfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ const fs = require('fs')

module.exports = {
id: 'adsb',
//type: 'kue',
store: 'memory',
//workersLimit: 1,
options: {
//workersLimit: 1
},
tasks: [{
id: 'adsb-exchange',
type: 'http',
Expand Down
Loading

0 comments on commit 927afef

Please sign in to comment.