Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Re-writing method without timeout
def wait_for_pending_requests
start = Time.now
while pending_requests?
if (Time.now - start) > 60
raise "Requests did not finish in 60 seconds"
else
sleep(0.01)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.