fix: update log level in crontask dist look.

This commit is contained in:
Monet Lee 2025-06-26 17:19:04 +08:00
parent a5ac7f2a81
commit b454bc2c70

View File

@ -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
} }