Sha256: 137232c95c829467ad8ae718daf2e1d85105c1dc852fd8cb86d10a226ad4bea8

Contents?: true

Size: 545 Bytes

Versions: 47

Compression:

Stored size: 545 Bytes

Contents

class ResourceImportFileStateMachine
  include Statesman::Machine

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

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

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

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

Version data entries

47 entries across 44 versions & 2 rubygems

Version Path
enju_biblio-0.4.0.beta.1 app/models/resource_import_file_state_machine.rb
enju_biblio-0.3.5 app/models/resource_import_file_state_machine.rb
enju_biblio-0.3.4 app/models/resource_import_file_state_machine.rb
enju_biblio-0.3.3 app/models/resource_import_file_state_machine.rb
enju_biblio-0.3.2 app/models/resource_import_file_state_machine.rb
enju_biblio-0.3.1 app/models/resource_import_file_state_machine.rb
enju_biblio-0.3.0 app/models/resource_import_file_state_machine.rb
enju_biblio-0.3.0.rc.1 app/models/resource_import_file_state_machine.rb
enju_biblio-0.3.0.beta.2 app/models/resource_import_file_state_machine.rb
enju_biblio-0.2.5 app/models/resource_import_file_state_machine.rb
enju_biblio-0.2.4 app/models/resource_import_file_state_machine.rb
enju_biblio-0.2.3 app/models/resource_import_file_state_machine.rb
enju_biblio-0.2.2 app/models/resource_import_file_state_machine.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_biblio-0.2.1/app/models/resource_import_file_state_machine.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_biblio-0.2.0/app/models/resource_import_file_state_machine.rb
enju_biblio-0.2.1 app/models/resource_import_file_state_machine.rb
enju_biblio-0.2.0 app/models/resource_import_file_state_machine.rb
enju_biblio-0.2.0.beta.4 app/models/resource_import_file_state_machine.rb
enju_biblio-0.2.0.beta.3 app/models/resource_import_file_state_machine.rb
enju_biblio-0.2.0.beta.2 app/models/resource_import_file_state_machine.rb