Sha256: 1b18a57bfa09ff17b4550efcf2c57628b2313741280ca6de8f7a6f97b52c7349

Contents?: true

Size: 630 Bytes

Versions: 11

Compression:

Stored size: 630 Bytes

Contents

# frozen_string_literal: true

module GoodJob
  # Shared methods for filtering Execution/Job records from the +good_jobs+ table.
  module ErrorEvents
    extend ActiveSupport::Concern

    included do
      error_event_enum = {
        interrupted: 0,
        unhandled: 1,
        handled: 2,
        retried: 3,
        retry_stopped: 4,
        discarded: 5,
      }
      if Gem::Version.new(Rails.version) >= Gem::Version.new('7.1.0.a')
        enum :error_event, error_event_enum, validate: { allow_nil: true }, scopes: false
      else
        enum error_event: error_event_enum, _scopes: false
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
good_job-4.8.0 app/models/concerns/good_job/error_events.rb
good_job-4.7.0 app/models/concerns/good_job/error_events.rb
good_job-4.6.0 app/models/concerns/good_job/error_events.rb
good_job-4.5.1 app/models/concerns/good_job/error_events.rb
good_job-4.5.0 app/models/concerns/good_job/error_events.rb
good_job-4.4.2 app/models/concerns/good_job/error_events.rb
good_job-4.4.1 app/models/concerns/good_job/error_events.rb
good_job-4.4.0 app/models/concerns/good_job/error_events.rb
good_job-4.3.0 app/models/concerns/good_job/error_events.rb
good_job-4.2.1 app/models/concerns/good_job/error_events.rb
good_job-4.2.0 app/models/concerns/good_job/error_events.rb