From 9b63e2327443979bb8daa5e829949c6a5c3999b0 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Thu, 17 Feb 2022 06:21:26 -0800 Subject: [PATCH] Update log messages --- forwarder.go | 2 +- heartbeat.go | 4 ++-- janitor.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/forwarder.go b/forwarder.go index ec1c1f2..0d65f5c 100644 --- a/forwarder.go +++ b/forwarder.go @@ -70,6 +70,6 @@ func (f *forwarder) start(wg *sync.WaitGroup) { func (f *forwarder) exec() { if err := f.broker.ForwardIfReady(f.queues...); err != nil { - f.logger.Errorf("Could not enqueue scheduled tasks: %v", err) + f.logger.Errorf("Failed to forward scheduled tasks: %v", err) } } diff --git a/heartbeat.go b/heartbeat.go index e3d817c..4199600 100644 --- a/heartbeat.go +++ b/heartbeat.go @@ -182,13 +182,13 @@ func (h *heartbeater) beat() { // Note: Set TTL to be long enough so that it won't expire before we write again // and short enough to expire quickly once the process is shut down or killed. if err := h.broker.WriteServerState(&info, ws, h.interval*2); err != nil { - h.logger.Errorf("could not write server state data: %v", err) + h.logger.Errorf("Failed to write server state data: %v", err) } for qname, ids := range idsByQueue { expirationTime, err := h.broker.ExtendLease(qname, ids...) if err != nil { - h.logger.Errorf("could not extend lease for tasks %v: %v", ids, err) + h.logger.Errorf("Failed to extend lease for tasks %v: %v", ids, err) continue } for _, id := range ids { diff --git a/janitor.go b/janitor.go index fbb38c5..40f5ea1 100644 --- a/janitor.go +++ b/janitor.go @@ -74,7 +74,7 @@ func (j *janitor) start(wg *sync.WaitGroup) { func (j *janitor) exec() { for _, qname := range j.queues { if err := j.broker.DeleteExpiredCompletedTasks(qname); err != nil { - j.logger.Errorf("Could not delete expired completed tasks from queue %q: %v", + j.logger.Errorf("Failed to delete expired completed tasks from queue %q: %v", qname, err) } }