aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2015-12-17 23:07:38 +0100
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2015-12-17 23:13:25 +0100
commit6a395d833bc7b2e6a3562a762c3fc1fc4b9405bf (patch)
tree2e20c2218f26f62ee2823fae758d2277d0d2737b
parentd3ab20e8e9304efdbd71a6025c40658abddca99b (diff)
downloadvipeval-6a395d833bc7b2e6a3562a762c3fc1fc4b9405bf.tar.gz
vipeval-6a395d833bc7b2e6a3562a762c3fc1fc4b9405bf.zip
Result processing.
-rw-r--r--lib/main_loop.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/main_loop.rb b/lib/main_loop.rb
index 473ec6e..93aaf91 100644
--- a/lib/main_loop.rb
+++ b/lib/main_loop.rb
@@ -58,8 +58,13 @@ class MainLoop
@ecs.connection["sys/events/fifo"].post ""
end
- def process_result_event(ev)
- # TODO remove exercise referenced through solution embedded in result
+ def process_result_event(evbody)
+ path= evbody[0]['ressource']
+ result= @ecs.connection[path].delete
+ Rails.logger.info "***** MainLoop#process_result_event: #{path} = #{result}"
+ # remove exercise referenced through solution embedded in result
+ path= URI(JSON::parse(result)["Result"]["Solution"]["exercise"]).path[1..-1]
+ @ecs.connection[path].delete
end
end