daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from boto.exception import AWSConnectionError
  2.  
  3. @app.task(bind=True, default_retry_delay=30 * 60)  # retry in 30 minutes.
  4. def upload_to_s3(self, data):
  5.     try:
  6.         #code to upload to S3
  7.     except AWSConnectionError as exc:
  8.  
  9.         raise self.retry(exc=exc, countdown=60)
RAW Paste Data
Top