worker/server: log unresponsive job removal
Re-add the logging for when unresponsive heartbeats are being removed so we can verify that they are correctly being logged as 5xx errors.
This commit is contained in:
parent
fe554ad184
commit
08aa1e99a1
1 changed files with 3 additions and 0 deletions
|
|
@ -114,6 +114,9 @@ func (s *Server) WatchHeartbeats() {
|
||||||
//nolint:staticcheck // avoid SA1015, this is an endless function
|
//nolint:staticcheck // avoid SA1015, this is an endless function
|
||||||
for range time.Tick(time.Second * 30) {
|
for range time.Tick(time.Second * 30) {
|
||||||
for _, token := range s.jobs.Heartbeats(time.Second * 120) {
|
for _, token := range s.jobs.Heartbeats(time.Second * 120) {
|
||||||
|
id, _ := s.jobs.IdFromToken(token)
|
||||||
|
logrus.Infof("Removing unresponsive job: %s\n", id)
|
||||||
|
|
||||||
missingHeartbeatResult := JobResult{
|
missingHeartbeatResult := JobResult{
|
||||||
JobError: clienterrors.WorkerClientError(clienterrors.ErrorJobMissingHeartbeat,
|
JobError: clienterrors.WorkerClientError(clienterrors.ErrorJobMissingHeartbeat,
|
||||||
fmt.Sprintf("Workers running this job stopped responding more than %d times.", maxHeartbeatRetries),
|
fmt.Sprintf("Workers running this job stopped responding more than %d times.", maxHeartbeatRetries),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue