Sha256: 9287ee1012b52c37e8af030b9aa88175e8462eed51b19e58acb6c77a1b11df67

Contents?: true

Size: 518 Bytes

Versions: 32

Compression:

Stored size: 518 Bytes

Contents

class EventImportFileStateMachine
  include Statesman::Machine

  state :pending, initial: true
  state :started
  state :completed
  state :failed

  transition from: :pending, to: :started
  transition from: :started, to: [:completed, :failed]

  after_transition(from: :pending, to: :started) do |event_import_file|
    event_import_file.update_column(:executed_at, Time.zone.now)
  end

  before_transition(from: :started, to: :completed) do |event_import_file|
    event_import_file.error_message = nil
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
enju_event-0.3.5 app/models/event_import_file_state_machine.rb
enju_event-0.4.0.rc.1 app/models/event_import_file_state_machine.rb
enju_event-0.3.4 app/models/event_import_file_state_machine.rb
enju_event-0.3.3 app/models/event_import_file_state_machine.rb
enju_event-0.4.0.beta.2 app/models/event_import_file_state_machine.rb
enju_event-0.4.0.beta.1 app/models/event_import_file_state_machine.rb
enju_event-0.3.2 app/models/event_import_file_state_machine.rb
enju_event-0.3.1 app/models/event_import_file_state_machine.rb
enju_event-0.3.0 app/models/event_import_file_state_machine.rb
enju_event-0.3.0.rc.1 app/models/event_import_file_state_machine.rb
enju_event-0.3.0.beta.1 app/models/event_import_file_state_machine.rb
enju_event-0.2.3 app/models/event_import_file_state_machine.rb
enju_event-0.2.2 app/models/event_import_file_state_machine.rb
enju_event-0.2.1 app/models/event_import_file_state_machine.rb
enju_event-0.2.0 app/models/event_import_file_state_machine.rb
enju_event-0.2.0.beta.4 app/models/event_import_file_state_machine.rb
enju_event-0.2.0.beta.3 app/models/event_import_file_state_machine.rb
enju_event-0.2.0.beta.2 app/models/event_import_file_state_machine.rb
enju_event-0.2.0.beta.1 app/models/event_import_file_state_machine.rb
enju_event-0.1.19 app/models/event_import_file_state_machine.rb