webapi-eca/examples/event-pollers/system.coffee

16 lines
290 B
CoffeeScript

###
System information
------------------------
###
isRunning = false
###
This event is emitted if the system had a restart.
###
exports.hasRestarted = () ->
if not isRunning
isRunning = true
pushEvent
content: "The system has been restarted at #{ ( new Date ).toISOString() }"