2
0
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:
Benjamin Grosse
2025-11-04 15:25:47 +00:00
committed by GitHub
parent a889ef0b08
commit d64f0b7ed0
6 changed files with 31 additions and 31 deletions

View File

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