states.rb revision 29df54c6935a6dc6ebd194518adf1b1a2c19b876
#
# states:
# * pending
# * downloading
# * processing
# * failed
# * done
#
TERMINAL_STATES = %w(failed done)
included do
end
state_changed? &&
end
if last_error
i = ind+2
i+=1
end
msg << out.sub(URI.regexp,"...").sub(/ \/[A-Za-z0-9\/.]*/," ...")
elsif last_error.include?("exited with status")
msg << last_error[0,50]+" ... "+last_error.match("exited with status.*")[0]
else
msg << lines.first
end
end
msg.join(": ")
end
protected
def after_update_state
ontology.state = state.to_s
ontology.save!
if ontology.distributed?
ontology.children.update_all state: ontology.state
end
end
end