Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akamaozu/supe-addon-start-citizen-signal
https://github.com/akamaozu/supe-addon-start-citizen-signal
addon supe supervision
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/akamaozu/supe-addon-start-citizen-signal
- Owner: Akamaozu
- Created: 2018-11-10T03:45:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-19T22:31:32.000Z (about 6 years ago)
- Last Synced: 2024-10-28T05:37:44.587Z (2 months ago)
- Topics: addon, supe, supervision
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [Supe](https://github.com/Akamaozu/node-supe) Add-On: Start Citizen on Signal
## Send signals to a supervisor to start a citizen
# Install
```
npm install --save supe-addon-start-citizen-signal
```# Setup
`supervisor`
```js
var supe = require('supe')(),
start_citizen_on_signal_addon = require('supe-addon-start-citizen-signal');supervisor.use( start_citizen_on_signal_addon );
supervisor.register( 'homepage-checker', './citizens/homepage-checker' );
```# Usage
`citizen`
```js
var citizen = require('supe'),
minute_in_ms = 1000 * 60;// run homepage checker every five mins
setInterval( start_homepage_checker, 5 * minute_in_ms );function start_homepage_checker(){
citizen.signal.send( 'START-CITIZEN', { citizen: 'homepage-checker' });
}
```