UNPKG
echelon
Version:
latest (0.1.0)
0.1.0
0.0.1
A distributed work queue built on Espial
github.com/normanjoyner/echelon
normanjoyner/echelon
echelon
/
lib
/
handlers.js
22 lines
(16 loc)
•
362 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module
.
exports
= {
handlers
: {
on_success
:
function
(
job
){
console
.
log
(
"success"
); },
on_failure
:
function
(
job
){
console
.
log
(
"failure"
); } },
add
:
function
(
name, handler
){
this
.
handlers
[name] = handler; },
remove
:
function
(
name
){
delete
this
.
handlers
[name]; } }