-
-
Save gr33n7007h/b7ef03c5cce64e34d6732c47d5d7e081 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fake_response | |
%i(ok warn fatal critical).sample | |
end | |
begin | |
msg = fake_response | |
if msg == :warn | |
raise | |
end | |
rescue RuntimeError | |
sleep(5) | |
retry | |
else | |
p msg | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment