fix Command on Event timeout

merge-requests/64/head
Moe 2019-05-25 12:38:46 -07:00
parent bfdd54484c
commit ce1fe2bc66
2 changed files with 2 additions and 1 deletions

View File

@ -245,6 +245,7 @@ module.exports = function(s,config){
delete(timeoutVar)
if(callback)callback()
},theTimeout)
return timeoutVar
}
s.isCorrectFilenameSyntax = function(string){
return RegExp('[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]-[0-9][0-9]-[0-9][0-9]').test(string)

View File

@ -323,7 +323,7 @@ module.exports = function(s,config,lang){
}
if(filter.command && currentConfig.detector_command_enable === '1' && !s.group[d.ke].mon[d.id].detector_command){
s.createTimeout(s.group[d.ke].mon[d.id].detector_command,currentConfig.detector_command_timeout,10)
s.group[d.ke].mon[d.id].detector_command = s.createTimeout(s.group[d.ke].mon[d.id].detector_command,currentConfig.detector_command_timeout,10)
var detector_command = addEventDetailsToString(d,currentConfig.detector_command)
exec(detector_command,{detached: true})
}