Class: Dipa::Agent
Constant Summary
Models::StateAttributeHandling::SHARED_CONTINUING_STATES, Models::StateAttributeHandling::SHARED_FINISHED_STATES
Models::AgentStateAttributes::AGENT_EXTRA_CONTINUING_STATES, Models::AgentStateAttributes::AGENT_EXTRA_FINISHED_STATES
Instance Method Summary
collapse
#failed_state?, #finished_state?
#load_from_file
#dump_to_file
Instance Method Details
#processing_timeout_reached? ⇒ Boolean
62
63
64
65
66
|
# File 'app/models/dipa/agent.rb', line 62
def processing_timeout_reached?
return false if coordinator.agent_processing_timeout.zero?
(started_at + coordinator.agent_processing_timeout) < Time.current.floor(Dipa::DATETIME_PRECISION)
end
|
#result ⇒ Object
46
47
48
49
50
|
# File 'app/models/dipa/agent.rb', line 46
def result
return unless finished?
load_from_file(attacher: :result_dump)
end
|
#source ⇒ Object
52
53
54
|
# File 'app/models/dipa/agent.rb', line 52
def source
load_from_file(attacher: :source_dump)
end
|
#timeout_reached? ⇒ Boolean
56
57
58
59
60
|
# File 'app/models/dipa/agent.rb', line 56
def timeout_reached?
return false if coordinator.agent_timeout.zero?
(created_at + coordinator.agent_timeout) < Time.current.floor(Dipa::DATETIME_PRECISION)
end
|