Skip to content

Commit 8bbe45b

Browse files
committed
[executor] optimize logging
1 parent 2ed046f commit 8bbe45b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/worker/executor/service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ func (s *Service) execute(ctx context.Context, task PeriodicTask) {
100100
logger := s.logger.With(zap.String("name", task.Name()))
101101

102102
if err := s.locker.AcquireLock(ctx, task.Name()); err != nil {
103-
logger.Error("failed to acquire lock", zap.String("name", task.Name()), zap.Error(err))
103+
logger.Error("failed to acquire lock", zap.Error(err))
104104
return
105105
}
106106
defer func() {
107107
if err := s.locker.ReleaseLock(ctx, task.Name()); err != nil {
108-
logger.Error("failed to release lock", zap.String("name", task.Name()), zap.Error(err))
108+
logger.Error("failed to release lock", zap.Error(err))
109109
}
110110
}()
111111

0 commit comments

Comments
 (0)