SIGN IN SIGN UP

fix(wallets): Release wallet refresh lock when giving up (#6056)

## Context

`Customers::RefreshWalletJob` uses the `until_executed` uniqueness
strategy, whose lock is released by the `after_perform` callback. That
callback is skipped whenever `perform` raises, and `retry_on` handlers
run outside of it.

When the job exhausted its throttling retries, the give-up block logged
the failure without re-raising, so Sidekiq considered the job successful
and its death handler never ran either. The lock therefore survived
until its TTL expired, and every re-enqueue from the clock job was
silently dropped on conflict, leaving the customer out of the refresh
cycle for up to 12 hours.

## Description

Release the uniqueness lock explicitly when the job gives up after
reaching the maximum number of throttling retries, so the clock job can
pick the customer up again on its next run.

Lower the lock TTL to 2 hours. The TTL is only a safety net for locks
that are never released, and it comfortably outlasts the longest
possible run including retries, while bounding how long a leaked lock
can keep a customer from being refreshed.
V
Vincent Pochet committed
526b4b51e74e2ebe2fa99d940887da86302c43d1
Parent: 68980dd
Committed by GitHub <noreply@github.com> on 7/30/2026, 3:43:19 PM