17 lines
366 B
Go
17 lines
366 B
Go
package task
|
|
|
|
import "git.lastassault.de/speatzle/morffix/constants"
|
|
|
|
type HealthCheckData struct {
|
|
Command string `json:"command"`
|
|
}
|
|
|
|
func (t *Task) RunHealthCheck(data HealthCheckData) {
|
|
defer func() {
|
|
if t.Status == constants.TASK_STATUS_RUNNING {
|
|
t.Status = constants.TASK_STATUS_FAILED
|
|
t.Log = append(t.Log, "Task Status Failed by Defer")
|
|
}
|
|
}()
|
|
|
|
}
|