UNPKG
curator
Version:
latest (0.0.9)
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
A flexible process monitoring and management framework.
clvv/Curator.js
curator
/
examples
/
watchWithConditions.coffee
17 lines
(13 loc)
•
342 B
text/coffeescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Curator
=
require
'curator'
watch =
Curator
.
newWatch
->
@name
=
'watch-with-conditions'
@startCommand
=
'node'
@checkInterval
=
500
@cond
(->
@stat
.
mem
<
7000
), [
3
,
5
],
Curator
.
helpers
.
stopper
@on
'new-stat'
, ->
console
.
log
@stat
.
mem
console
.
log
@timelines
[
0
].
records
watch.
use
Curator
.
setPoll
Curator
.
startAll
()