Name: agenda
Owner: Lad
Description: Agenda for Lad
Created: 2017-12-01 21:20:13.0
Updated: 2017-12-01 21:21:41.0
Pushed: 2017-12-11 10:43:10.0
Homepage: https://lad.js.org
Size: 67
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Agenda for Lad
npm:
install @ladjs/agenda
yarn:
add @ladjs/agenda
This package serves as a drop-in replacement for a normal Agenda require()
call. It carries the same exact API and returns the same Agenda instance that it normally would (except it adds some extra glue on top, such as built-in integration of stop-agenda).
Default options are shown below:
sr/bin/env node
t Agenda = require('@ladjs/agenda');
t mongoose = require('@ladjs/mongoose');
t Graceful = require('@ladjs/graceful');
t agenda = new Agenda();
da.configure({
gger: console,
these are options passed directly to `stop-agenda`
<https://github.com/ladjs/stop-agenda>
opAgenda: {
cancelQuery: {
repeatInterval: {
$exists: true,
$ne: null
}
}
these are jobs defined via `config.jobs`
e.g. `agendaJobDefinitions: [ [name, agendaOptions, fn], ... ]`
endaJobDefinitions: [],
these get automatically invoked to `agenda.every`
e.g. `agenda.every('5 minutes', 'locales')`
and you define them as [ interval, job name ]
you need to define them here for graceful handling
e.g. `agendaRecurringJobs: [ ['5 minutes', 'locales' ], ... ]`
endaRecurringJobs: [],
these get automatically invoked when process starts
e.g. `agenda.now('locales');`
and you define them as Strings in the array
e.g. `config.now: ['locales','ping','pong','beep', ... ]`
endaBootJobs: []
oose.configure({
.config.mongoose,
gger,
enda
oose
onnect()
hen(() => {
agenda.start();
atch(logger.error);
t graceful = new Graceful({
ngoose,
enda,
gger
eful.listen();
| Name | Website | | ————– | ————————– | | Nick Baugh | http://niftylettuce.com/ |