Worker: clarify message when sleep command is aborted
Instead of logging "sleep aborted", the message is now "sleep command aborted", to make it clear that it's about the sleep command, and not the "asleep" worker state.
This commit is contained in:
parent
d35ca9d98f
commit
bedf10e435
@ -55,8 +55,8 @@ func (ce *CommandExecutor) cmdSleep(ctx context.Context, logger zerolog.Logger,
|
|||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
err := ctx.Err()
|
err := ctx.Err()
|
||||||
log.Warn().Err(err).Msg("sleep aborted because context closed")
|
log.Warn().Msg("sleep command aborted due to context shutdown")
|
||||||
return fmt.Errorf("sleep aborted because context closed: %w", err)
|
return fmt.Errorf("sleep command aborted due to context shutdown: %w", err)
|
||||||
case <-ce.timeService.After(duration):
|
case <-ce.timeService.After(duration):
|
||||||
log.Debug().Msg("sleeping done")
|
log.Debug().Msg("sleeping done")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user