Permalink
Browse files

INTRODUCE: does not take 'server_id' but 'host' parameter

  • Loading branch information...
rekado committed Nov 29, 2014
1 parent 4bc5944 commit 21e4423de186704964e1e9941e6943204feedf14
Showing with 12 additions and 1 deletion.
  1. +12 −1 lib/jobs.rb
View
@@ -345,7 +345,18 @@ def self.perform(params)
class INTRODUCE < RequestJob
def self.perform(params)
with_tree(params['server_id'], :req_introduce)
host = params['host']
begin
success, response = Request.client.request(host, Request.client.req_introduce)
rescue Timeout::Error => e
raise Libertree::RetryJob, "With #{host}: #{e.message}"
rescue => e
raise Libertree::RetryJob, "Fatal error: with #{host}: #{e.message}"
end
if ! success
raise Libertree::JobFailed, "Rejected by #{host}: #{response}"
end
end
end

0 comments on commit 21e4423

Please sign in to comment.