Skip to content

Commit ebe632f

Browse files
committed
refactor: use touch_all for wallet sync [ING-112]
## Context Review follow-up: touch_all sets updated_at together with the named column in one statement, replacing the manual update_all pair.
1 parent bba6889 commit ebe632f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

app/services/customers/refresh_wallets_service.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ def call
3131
)
3232
end
3333

34-
now = Time.current
35-
Wallet.where(id: all_wallets.map(&:id)).update_all(updated_at: now, last_ongoing_balance_sync_at: now) # rubocop:disable Rails/SkipsModelValidations
34+
Wallet.where(id: all_wallets.map(&:id)).touch_all(:last_ongoing_balance_sync_at) # rubocop:disable Rails/SkipsModelValidations
3635

3736
customer.update!(awaiting_wallet_refresh: false)
3837

0 commit comments

Comments
 (0)