Sha256: d7fd2db3e974cb31653ea8ef637609d6ec8e165bcf9617237dc2262a546ba5fd
Contents?: true
Size: 529 Bytes
Versions: 64
Compression:
Stored size: 529 Bytes
Contents
class AgentImportFileStateMachine 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 |agent_import_file| agent_import_file.update_column(:executed_at, Time.zone.now) end before_transition(from: :started, to: :completed) do |agent_import_file| agent_import_file.error_message = nil end end
Version data entries
64 entries across 61 versions & 2 rubygems