Add support to clusterer for host errors

dev
Ice3man543 2021-08-17 16:05:29 +05:30
parent 586b4c0f8e
commit a9b4cb076b
1 changed files with 6 additions and 0 deletions

View File

@ -86,6 +86,9 @@ func (e *Executer) Execute(input string) (bool, error) {
}
}
})
if err != nil && e.options.HostErrorsCache != nil && e.options.HostErrorsCache.CheckError(err) {
e.options.HostErrorsCache.MarkFailed(input)
}
return results, err
}
@ -105,5 +108,8 @@ func (e *Executer) ExecuteWithResults(input string, callback protocols.OutputEve
}
}
})
if err != nil && e.options.HostErrorsCache != nil && e.options.HostErrorsCache.CheckError(err) {
e.options.HostErrorsCache.MarkFailed(input)
}
return err
}