lib/backburner/allq_wrapper.rb in backburner-allq-1.0.34 vs lib/backburner/allq_wrapper.rb in backburner-allq-1.0.35
- old
+ new
@@ -217,34 +217,31 @@
is_parent = options[:is_parent] || false
result = nil
begin
Timeout.timeout(10) do
- if body && body.to_s.include?('["default"]')
- end
-
if is_parent
new_job = build_new_parent_job(body, options)
result = @client.parent_job_post(new_job)
else
new_job = build_new_job(body, options)
result = @client.job_post(new_job)
end
raise 'PUT returned nil' if result.nil? || result.to_s == ''
end
rescue Timeout::Error
- puts('ALLQ_PUT_TIMEOUT')
+ puts('ALLQ PUT timeout, retrying...')
sleep(5)
retry_count += 1
retry if retry_count < 4
- raise 'Failed to put on allq, we are investigating the problem, please try again'
+ raise "Failed to put on allq, we are investigating the problem, please try again -> #{body}"
rescue StandardError => e
- puts('Failed to ALLQ PUT')
+ puts('Failed to ALLQ PUT, retrying...')
puts(e)
retry_count += 1
sleep(5)
retry if retry_count < 4
- raise 'Failed to put on allq, we are investigating the problem, please try again'
+ raise "Failed to put on allq, we are investigating the problem, please try again: #{body}"
end
result
end
def stats(tube)