Class: Partner::ReservationSummarySyncWorker

Inherits:
ApplicationWorker show all
Includes:
ElasticAPM::SpanHelpers, Sidekiq::Worker
Defined in:
app/workers/partner/reservation_summary_sync_worker.rb

Instance Method Summary collapse

Methods inherited from ApplicationWorker

unlimited_retry

Instance Method Details

#perform(reservation_id, sync_type = 'full') ⇒ Boolean

Perform reservation summary synchronization

Synchronizes reservation data to summary tables based on the specified sync type. Supports multiple sync types: 'full', 'status', 'financial', 'package', 'loyalty', 'destroy'. Sidekiq automatically retries transient errors with exponential backoff (up to 25 times).

Parameters:

  • reservation_id (Integer)

    the reservation ID to sync

  • sync_type (String) (defaults to: 'full')

    the type of sync to perform (default: 'full')

    • 'full': syncs all reservation data

    • 'status': syncs only status information

    • 'financial': syncs only financial data

    • 'package': syncs only package information

    • 'loyalty': syncs only loyalty information

    • 'destroy': removes summary record

Returns:

  • (Boolean)

    true if sync succeeded

Raises:

  • (StandardError)

    re-raises exceptions to trigger Sidekiq retries



41
# File 'app/workers/partner/reservation_summary_sync_worker.rb', line 41

span_method :perform