fix: update log level in crontask dist look. (#3440)

pull/3451/head
Monet Lee 2 months ago committed by GitHub
parent a5ac7f2a81
commit bd56bd23b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -52,15 +52,12 @@ func (e *EtcdLocker) ExecuteWithLock(ctx context.Context, taskName string, task
err = mutex.TryLock(ctxWithTimeout) err = mutex.TryLock(ctxWithTimeout)
if err != nil { if err != nil {
if err == context.DeadlineExceeded { // errors.Is(err, concurrency.ErrLocked)
log.ZDebug(ctx, "Task is being executed by another instance, skipping", log.ZDebug(ctx, "Task is being executed by another instance, skipping",
"taskName", taskName, "taskName", taskName,
"instanceID", e.instanceID) "instanceID", e.instanceID,
} else { "error", err.Error())
log.ZWarn(ctx, "Failed to acquire task lock", err,
"taskName", taskName,
"instanceID", e.instanceID)
}
return return
} }

Loading…
Cancel
Save