Skip to content
This repository has been archived by the owner on Apr 10, 2020. It is now read-only.

Commit

Permalink
Check the needed env vars are provided to the backfill script
Browse files Browse the repository at this point in the history
  • Loading branch information
Tenzer committed May 14, 2015
1 parent 849e6a6 commit 0b6ced2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backfill.py
Expand Up @@ -6,6 +6,12 @@
import boto3


if not all([environ.get('AWS_S3_BUCKET'), environ.get('AWS_SQS_URL')]):
print('You have to specify the AWS_S3_BUCKET and AWS_SQS_URL environment variables.')
print('Check the "Backfilling data" section of the README file for more info.')
exit(1)


bucket = boto3.resource('s3').Bucket(environ.get('AWS_S3_BUCKET'))
queue = boto3.resource('sqs').Queue(environ.get('AWS_SQS_URL'))

Expand Down

0 comments on commit 0b6ced2

Please sign in to comment.