Skip to content

Commit

Permalink
fix status check
Browse files Browse the repository at this point in the history
  • Loading branch information
iloire committed Aug 22, 2012
1 parent 5381213 commit 7ac56b2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var config = require('./config/general');
var email_service = require ('./lib/email');
var email_service = require ('./lib/notifications/email/email');
var storage_factory = require ('./lib/storage/storage_factory');
var services = require ('./lib/services').load_services();

Expand All @@ -20,8 +20,7 @@ watchmen.on('service_error', function(service, state){

console.log (info);


if (state.prev_state.status != 1 && config.notifications.enabled){
if (state.prev_state.status === 'success' && config.notifications.enabled){
email_service.sendEmail(
service.alert_to,
service.url_info + ' is down!',
Expand Down

0 comments on commit 7ac56b2

Please sign in to comment.