states.rb revision fda87b00b3f144f81547c33512cd397f211b5bba
#
# states:
# * pending
# * fetching
# * processing
# * 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