diff options
author | mguetlein <martin.guetlein@gmail.com> | 2014-10-06 21:49:19 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2014-10-06 21:49:19 +0200 |
commit | ecf667cc0705e2860432c89cce95f47f854e5146 (patch) | |
tree | 6a48da126daf8bc5fcf3204fbd510716855f4e82 /lib/task.rb | |
parent | a10fabfc533b4f21eff0fc102ced5b1d2c3e3699 (diff) |
fix: code from task has to be fetched via get (this did only work before because a head on task was actually interpreted as a get)
Diffstat (limited to 'lib/task.rb')
-rw-r--r-- | lib/task.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/task.rb b/lib/task.rb index 6d6a3a7..f5016d5 100644 --- a/lib/task.rb +++ b/lib/task.rb @@ -24,6 +24,7 @@ module OpenTox rescue => e # wrap non-opentox-errors first e = OpenTox::Error.new(500,e.message,nil,e.backtrace) unless e.is_a?(OpenTox::Error) + $logger.error "error in task #{task.uri} created by #{creator}" # creator is not logged because error is logged when thrown RestClientWrapper.put(File.join(task.uri,'Error'),{:errorReport => e.to_ntriples},{:content_type => 'text/plain'}) task.kill end @@ -89,7 +90,7 @@ module OpenTox end def code - RestClientWrapper.head(@uri).code.to_i + RestClientWrapper.get(@uri).code.to_i end # get only header for status requests |