Reload job in ui
This commit is contained in:
@@ -20,12 +20,12 @@ type Job struct {
|
||||
Schedule string
|
||||
Raw string
|
||||
Runner Runner
|
||||
Disabled bool
|
||||
foo func()
|
||||
LastStatus int
|
||||
LastOutput string
|
||||
LastRuntime time.Duration
|
||||
LastRun time.Time
|
||||
Disabled bool
|
||||
}
|
||||
|
||||
func NewJob(runner Runner, schedule, raw string) (*Job, error) {
|
||||
@@ -59,7 +59,7 @@ func newBashJob(schedule, sh string, title ...string) (*Job, error) {
|
||||
out, err := cmd.CombinedOutput()
|
||||
j.LastRuntime = time.Since(start)
|
||||
if err != nil {
|
||||
out = []byte(fmt.Sprintf("error running command: %v: %v", err, out))
|
||||
out = []byte(fmt.Sprintf("error running command: %v: %s", err, out))
|
||||
}
|
||||
j.LastOutput = strings.TrimSpace(string(out))
|
||||
if cmd != nil && cmd.ProcessState != nil {
|
||||
|
||||
Reference in New Issue
Block a user