mirror of
https://github.com/hibiken/asynq.git
synced 2026-05-02 05:45:51 +08:00
wrap all fmt.Errorf errors (#1047)
Users need to be able to match with `errors.Is()` also on external errors, for example `context.Canceled`.
This commit is contained in:
@@ -94,7 +94,7 @@ func (s *Semaphore) Release(ctx context.Context) error {
|
||||
|
||||
n, err := s.rc.ZRem(ctx, semaphoreKey(s.scope), taskID).Result()
|
||||
if err != nil {
|
||||
return fmt.Errorf("redis command failed: %v", err)
|
||||
return fmt.Errorf("redis command failed: %w", err)
|
||||
}
|
||||
|
||||
if n == 0 {
|
||||
|
||||
Reference in New Issue
Block a user