swarm-pulse

2.0.1 • Public • Published

Build Status Coverage Status Version

License Code style

Motivation

swarm-pulse is a SDK for a docker swarm scheduler engine.

Setup

export PULSE_CONFIG_PATH=$(pwd)/test/tasks-offline.json export DEBUG=,-express:,-send,-eslint:,-eslintrc:

Query plan


*    *    *    *    *    *
┬    ┬    ┬    ┬    ┬    ┬
│    │    │    │    │    |
│    │    │    │    │    └ day of week (0 - 7) (0 or 7 is Sun)
│    │    │    │    └───── month (1 - 12)
│    │    │    └────────── day of month (1 - 31)
│    │    └─────────────── hour (0 - 23)
│    └──────────────────── minute (0 - 59)
└───────────────────────── second (0 - 59, optional)


0 */2     * * *
=> trigger every 2 hour

Persistence

By design, we avoir keeping any persistence, task are awaited until their scheduled trigger. If the trigger is missed, the tasks will have to wait until the next event.

Status

  • running (sql query is ongoing)
  • pending (query is scheduled to be executed ASAP)
  • scheduled (query is awaiting a futur trigger)

Overlap

Overlapping tasks are dropped. I.e. : if as task currently running (or pending) and the schedule trigger is fired, execution order will be droppped (until next tick)

Killing the daemon will abort all running (and pending) tasks until next scheduled trigger.

Credits

Readme

Keywords

Package Sidebar

Install

npm i swarm-pulse

Weekly Downloads

2

Version

2.0.1

License

ISC

Unpacked Size

15.5 kB

Total Files

11

Last publish

Collaborators

  • 131
  • frodon