Skip to content
This repository has been archived by the owner on Jan 28, 2019. It is now read-only.
/ medic-sentinel Public archive

Node.js worker for medic-webapp

Notifications You must be signed in to change notification settings

medic/medic-sentinel

Repository files navigation

LEGACY medic-sentinel

Node process that runs background tasks for medic-webapp

Legacy Note

For 2.15 and greater versions of medic-webapp we have merged medic-api and medic-sentinel repositories directly into the main repo.

This repo exists only to service 2.14.x builds and below, and will eventually be archived.

Build Status

Install

Get node deps with npm install.

Run

node server.js

Debug mode:

node server.js debug

Run Tests

grunt test

Overview

Sentinel listens to the CouchDB changes feed and runs a set of transitions on on a given database change. It also manages scheduled tasks like message schedules.

Settings

Export a COUCH_URL env variable so sentinel knows what database to use. e.g.

export COUCH_URL='http://admin:pass@localhost:5984/medic'

Throughout this document we will be referring to ddoc. Here we mean the currently deployed _design/medic ddoc from medic-webapp.

Default settings values are in defaults.js. On initial start, and when there are changes to the ddoc, sentinel reads ddoc.app_settings to determine configuration.

By default all transitions are disabled, to enable a transition modify the transitions property on ddoc.app_settings.

Additional documentation

About

Node.js worker for medic-webapp

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published