Skip to content

Instantly share code, notes, and snippets.

@claustres
Last active November 29, 2017 16:56
Show Gist options
  • Save claustres/5fb412bbdddb7a7646dfc75690e025e5 to your computer and use it in GitHub Desktop.
Save claustres/5fb412bbdddb7a7646dfc75690e025e5 to your computer and use it in GitHub Desktop.
Job file with hooks definition
let job = {
// Options for job executor
options: {
workersLimit: 4
},
// Store to be used
store: {
id: 'job-store',
type: 'fs',
options: { path: './data' }
},
// Common options for all generated tasks
taskTemplate: {
store: 'job-store',
id: '<%= jobId %>-<%= taskId %>.tif',
type: 'xxx',
options: {
...
}
},
// Hooks setup
hooks: {
tasks: {
after: {
computeSomething: {
hookOption: ...
}
}
},
jobs: {
before: {
generateTasks: {
hookOption: ...
}
},
after: {
generateOutput: {
hookOption: ...
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment