@wealthbar/chronos
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Chronos

Mini sidekiq like runner for scheduling work on a worker.

This can't be directly used as-is, and takes some work to setup.

Setup

Create a migration based on the data/seed.sql file here to create the tables and indexes chronos will use for scheduling work and tracking runs.

Create a worker script, based on eg/main.ts, that will be spawned under its own nodejs process in your docker.

The environment variable 'CHRONOS_RUNNER_ID' is used in the example code to control the worker ID used. Generally you should have one and only one worker, but since two nodes could overlap during deployments the runner id is used to latch runs to a specific worker and prevent other workers from touching those runs.

Package Sidebar

Install

npm i @wealthbar/chronos

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

227 kB

Total Files

52

Last publish

Collaborators

  • nkode0x00
  • tanglebones
  • chrisnicola