Skip to content

Commit

Permalink
small scriptService cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
todbot committed Jan 13, 2018
1 parent 64330b3 commit 3181ac9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/server/scriptService.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var ScriptService = {
stop: function() {
log.msg("ScriptService.stop");
// stop previous timers
this.ruleTimers.map( function(t) { clearInterval(t); } );
this.ruleTimers.map( function(timer) { clearInterval(timer); } );
this.ruleTimers = [];
this.lastEvents = {};
},
Expand Down Expand Up @@ -78,7 +78,7 @@ var ScriptService = {
// }
runRule: function(rule) {
var self = this;
log.msg("ScriptService.runRule:",rule,"timers:",self.ruleTimers);
log.msg("ScriptService.runRule:",rule.name, rule.type, rule,"timer Ids:",self.ruleTimers);
if( rule.type === 'script' ) {
var spawn = require('child_process').spawn;
try {
Expand Down Expand Up @@ -164,7 +164,7 @@ var ScriptService = {
* @return {[type]} [description]
*/
parse: function(rule, str) {
log.msg("ScriptService.parse:", str, "rule:",rule);
// log.msg("ScriptService.parse:", str, "rule:",rule);
if( typeof str != "string" ) {
str = (str) ? str.toString() : ''; // convert to string
}
Expand Down

0 comments on commit 3181ac9

Please sign in to comment.