Guest User

Untitled

a guest
Dec 7th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  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)
Add Comment
Please, Sign In to add comment