Job service for sammler.
Very simple, opinionated and re-usable service to get scheduled jobs into your stack.
On purpose this service wraps for now agenda, but the interface of the service is generic enough to potentially move to another job-scheduler in the future.
jobs-service can be configured by the following environment variables:
General:
PORT
- The port to run the REST API (defaults to3003
).JWT_SECRET
- The secret used for JWT.NODE_ENV
- Environment settings for the service (production
,development
ortest
), defaults todevelopment
.
MongoDB:
MONGODB_DEBUG
- Whether to use the Mongoose debug mode or not, defaults tofalse
.MONGODB_HOST
- MongoDB host, defaults tolocalhost
.MONGODB_PORT
- MongoDB port, defaults to27017
.MONGODB_DATABASE
- The MongoDB database, defaults todb
.
NATS-Streaming:
NATS_STREAMING_HOST
- The NATS-Streaming host, defaults tolocalhost
.NATS_STREAMING_PORT
- The NATS-Streaming port, defaults to `4222'.
Behavior:
ENABLE_AUDIT_LOG
- Whether to enable the audit log or not, can betrue
orfalse
, defaults totrue
.
Deprecated:
LOAD_FROM_FILE
- All jobs will be loaded from a file, thus completely skipping MongoDB (defaults to false);SAMMLER_DB_JOBS_URI
- URI for the MongoDB Jobs database. Defaults tomongodb://localhost:27117/jobs
Stefan Walther
MIT