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:
parent
c55a867f61
commit
88aa67dba7
1 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue