mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-25 23:32:17 +08:00
Update log messages
This commit is contained in:
parent
de25201d9f
commit
9b63e23274
@ -70,6 +70,6 @@ func (f *forwarder) start(wg *sync.WaitGroup) {
|
|||||||
|
|
||||||
func (f *forwarder) exec() {
|
func (f *forwarder) exec() {
|
||||||
if err := f.broker.ForwardIfReady(f.queues...); err != nil {
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
// 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.
|
// 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 {
|
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 {
|
for qname, ids := range idsByQueue {
|
||||||
expirationTime, err := h.broker.ExtendLease(qname, ids...)
|
expirationTime, err := h.broker.ExtendLease(qname, ids...)
|
||||||
if err != nil {
|
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
|
continue
|
||||||
}
|
}
|
||||||
for _, id := range ids {
|
for _, id := range ids {
|
||||||
|
@ -74,7 +74,7 @@ func (j *janitor) start(wg *sync.WaitGroup) {
|
|||||||
func (j *janitor) exec() {
|
func (j *janitor) exec() {
|
||||||
for _, qname := range j.queues {
|
for _, qname := range j.queues {
|
||||||
if err := j.broker.DeleteExpiredCompletedTasks(qname); err != nil {
|
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)
|
qname, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user