Skip to content

Instantly share code, notes, and snippets.

@billyshambrook
Last active December 28, 2015 06:09
Show Gist options
  • Save billyshambrook/7454510 to your computer and use it in GitHub Desktop.
Save billyshambrook/7454510 to your computer and use it in GitHub Desktop.
Example usage for the retry decorator.
import boto.sqs
""" Defence from brief connection outages """
@retry(10)
def connect_to_sqs():
conn = boto.sqs.connect_to_region("us-west-2")
return conn.create_queue('myqueue')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment