29df54c6935a6dc6ebd194518adf1b1a2c19b876Tim Reddehase after_save :after_update_state, if: :change_applicable?
f788f380e8ad6e3923210eaacfc832b2bd015428Julian Kornberger if (ind=lines.index("*** Error:")) and (out = lines[ind+1]).present?
f788f380e8ad6e3923210eaacfc832b2bd015428Julian Kornberger while lines[i] and !lines[i].include?("hets: user error") do
f788f380e8ad6e3923210eaacfc832b2bd015428Julian Kornberger msg << out.sub(URI.regexp,"...").sub(/ \/[A-Za-z0-9\/.]*/," ...")
f788f380e8ad6e3923210eaacfc832b2bd015428Julian Kornberger elsif last_error.include?("exited with status")
f788f380e8ad6e3923210eaacfc832b2bd015428Julian Kornberger msg << last_error[0,50]+" ... "+last_error.match("exited with status.*")[0]
f788f380e8ad6e3923210eaacfc832b2bd015428Julian Kornberger msg << lines.first
f788f380e8ad6e3923210eaacfc832b2bd015428Julian Kornberger msg.join(": ")
f5a01e37663bdf559d6e251191b5097dd6f28ea5Julian Kornberger def after_update_state
6097dbf238b09e567fd30f7dd8fd2b6974f74259Eugen Kuksa ontology.state = state
5cad3e82e8c017bc189c4cecc00541ec19a2a6e2Julian Kornberger ontology.save!
0c480325395e8989d1abc5ba6d71a8bdd524bc4eIngo Becker if ontology.distributed?
6097dbf238b09e567fd30f7dd8fd2b6974f74259Eugen Kuksa ontology.children.update_all(state: ontology.state)