Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/retroburst/CEWatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
retroburst committed Sep 23, 2016
2 parents 4b0628c + 6e5bd36 commit 0ff6e95
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions modules/currency-exchange-json-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,9 @@ var compareRates = function compareRates(ratesOfInterest)
}
}
}
// if we have some change in rates or if there is no pulls
// in the datastore yet - save the pull
if(changedRates.length > 0 || pulls.length === 0){
logger.info("Storing this pull in the datastore.");
// stuff them into the datastore
insertNewPullDoc(ratesOfInterest);
} else {
logger.info("Not storing this pull in the datastore.");
}
// stuff them into the datastore
logger.info("Storing the pull in the datastore.");
insertNewPullDoc(ratesOfInterest);
// if change in rates - notify via email
if(changedRates.length > 0) {
sendEmailNotifications(changedRates);
Expand Down

0 comments on commit 0ff6e95

Please sign in to comment.