Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion internal/cron/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,19 @@ func evaluateJob(ctx context.Context, logger *logrus.Logger, store *Store, job J
if err := store.FailJob(ctx, job.ID, -1, "machine destroyed before we could interpret the results"); err != nil {
log.WithError(err).Errorf("failed to update job %d status", job.ID)
}
return nil
} else {
log.WithError(err).Errorf("failed to get machine %s", job.MachineID.String)
}
} else {
log.WithError(err).Errorf("failed to get machine %s: %v", job.MachineID.String, err)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure if it deliberately proceeds in non-404 cases, so let me know if it does. 🙂

}

return nil
}

if machine == nil {
log.Errorf("job %d has a nil machine %s", job.ID, job.MachineID.String)
return nil
}

log.Debugf("Monitoring job")
Expand Down