Skip to content

Instantly share code, notes, and snippets.

@kirillshevch
Created June 14, 2020 09:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kirillshevch/9885c75a3ab992e956f73869cc062dde to your computer and use it in GitHub Desktop.
Save kirillshevch/9885c75a3ab992e956f73869cc062dde to your computer and use it in GitHub Desktop.
# Will retry all exceptions
Retriable.with_context(:aws) do
# aws_call
end
# Will retry Mysql::DeadlockException
Retriable.with_context(:mysql) do
# write_to_table
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment