actually put the post in the xml param where we expecting it. also, throw the errors so we know in whats going on in resque

This commit is contained in:
maxwell 2010-12-04 13:54:39 -08:00
parent c55a867f61
commit 88aa67dba7

View file

@ -3,9 +3,10 @@ module Jobs
@queue = :http @queue = :http
def self.perform(url, body, tries_remaining) def self.perform(url, body, tries_remaining)
begin begin
RestClient.post(url, body) RestClient.post(url, :xml => body)
rescue rescue Exception => e
Resque.enqueue(self, url, body, tries_remaining -1) unless tries_remaining <= 1 Resque.enqueue(self, url, body, tries_remaining -1) unless tries_remaining <= 1
raise e
end end
end end
end end