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