Class: SpreeCmCommissioner::TelegramAlerts::IntegrationSyncFailureJob

Inherits:
ApplicationJob show all
Defined in:
app/jobs/spree_cm_commissioner/telegram_alerts/integration_sync_failure_job.rb

Instance Method Summary collapse

Methods included from ApplicationJobDecorator

handle_deserialization_error, prepended

Instance Method Details

#perform(options) ⇒ Object

Handle error by logging and sending alert

Parameters:

  • error_message (String)

    The error message

  • data (Hash)

    Additional context data (e.g., sync_type, match_id, event_type)



9
10
11
12
13
14
# File 'app/jobs/spree_cm_commissioner/telegram_alerts/integration_sync_failure_job.rb', line 9

def perform(options)
  SpreeCmCommissioner::TelegramAlerts::IntegrationSyncFailure.call(
    error_message: options[:error_message],
    data: options[:data] || {}
  )
end