diff options
author | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2015-12-17 23:03:47 +0100 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2015-12-17 23:13:19 +0100 |
commit | d3ab20e8e9304efdbd71a6025c40658abddca99b (patch) | |
tree | 0a90a85a15de9770d6403e18fcb26a04510b6330 | |
parent | e4bce34097cbe4202acdaa73b68776b5c243ec56 (diff) | |
download | vipeval-d3ab20e8e9304efdbd71a6025c40658abddca99b.tar.gz vipeval-d3ab20e8e9304efdbd71a6025c40658abddca99b.zip |
Substitute exercise url in solution.
-rw-r--r-- | lib/job_event.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/job_event.rb b/lib/job_event.rb index 0d0202d..e41794c 100644 --- a/lib/job_event.rb +++ b/lib/job_event.rb @@ -74,8 +74,12 @@ class JobEvent ## # Calls the computation backend with membership_id *mid*. def compute(exercise, solution, mid) - @ecs.connection[APP_CONFIG["resources"]["exercises"]["name"]].post exercise.to_json, {"X-EcsReceiverMemberships" => mid} - @ecs.connection[APP_CONFIG["resources"]["solutions"]["name"]].post solution.to_json, {"X-EcsReceiverMemberships" => mid} + response= @ecs.connection[APP_CONFIG["resources"]["exercises"]["name"]].post exercise.to_json, {"X-EcsReceiverMemberships" => mid} + solution["Solution"]["exercise"]= response.headers[:location] + Rails.logger.info "***** JobEvent#compute substitute exersice URL in solution to: #{solution["Solution"]["exercise"]}" + @ecs.connection[APP_CONFIG["resources"]["solutions"]["name"]].post solution.to_json, {"X-EcsReceiverMemberships" => mid} do |response, request, result| + Rails.logger.info "***** JobEvent#compute solution post response: #{response.headers}" + end end end |