Last active
December 28, 2015 06:09
-
-
Save billyshambrook/7454510 to your computer and use it in GitHub Desktop.
Example usage for the retry decorator.
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
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