ladjs/agenda

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

@ladjs/agenda

build status code coverage code style styled with prettier made with lass license

Agenda for Lad

Table of Contents
Install

npm:

install @ladjs/agenda

yarn:

 add @ladjs/agenda
Usage

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();
Contributors

| Name | Website | | ————– | ————————– | | Nick Baugh | http://niftylettuce.com/ |

License

MIT © Nick Baugh


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.