mirror of
https://github.com/we-promise/sure.git
synced 2026-06-01 08:49:01 +00:00
* Complete Sophtron account mapping * Clarify Sophtron login challenge flow * Add Sophtron connection UI timeout * Treat Sophtron timeout jobs as failed * Reset failed Sophtron connection state * Handle stale Sophtron connection jobs * Advance Sophtron polling timeout * Shorten Sophtron connection timeout * Fix Sophtron modal polling updates * Stabilize Sophtron MFA polling * Give Sophtron OTP challenges more time * Clarify Sophtron institution login failures * Extend Sophtron polling during login progress * Probe Sophtron accounts after completed MFA step * Align Sophtron dialogs with design system * Start Sophtron initial load after linking accounts * Fix Sophtron initial transaction load * Fail Sophtron sync without institution connection * Fix tests * Wrap Sophtron account linking in transaction * Wrap Sophtron provider responses * Fix Sophtron MFA security tests * Guard Sophtron MFA challenge arrays * Respect Sophtron initial load window * Use unique Sophtron MFA answer field ids * Address Sophtron review follow-ups * Fix Sophtron transaction sync refresh * Avoid blocking Sophtron refresh polling * Move Sophtron account helpers to model * Keep Sophtron grouping provider-level * Start new Sophtron institution links * Isolate Sophtron institution connections --------- Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
21 lines
575 B
Ruby
21 lines
575 B
Ruby
class SophtronInitialLoadJob < ApplicationJob
|
|
queue_as :high_priority
|
|
|
|
RETRY_DELAY = 10.seconds
|
|
MAX_ATTEMPTS = 30
|
|
|
|
def perform(sophtron_item, attempts_remaining: MAX_ATTEMPTS)
|
|
if sophtron_item.syncing?
|
|
if attempts_remaining.positive?
|
|
self.class.set(wait: RETRY_DELAY).perform_later(sophtron_item, attempts_remaining: attempts_remaining - 1)
|
|
else
|
|
Rails.logger.warn("SophtronInitialLoadJob - gave up waiting for SophtronItem #{sophtron_item.id} to finish syncing")
|
|
end
|
|
|
|
return
|
|
end
|
|
|
|
sophtron_item.sync_later
|
|
end
|
|
end
|