List and individual job pages now fetch data from api.

Few bug fixes around job uuid.
This commit is contained in:
Adam Shimali
2016-01-29 15:35:35 +00:00
parent 5f7b9fed3a
commit 4ea50499c3
11 changed files with 132 additions and 125 deletions

View File

@@ -1,17 +1,13 @@
import uuid
from boto3 import resource
def s3upload(service_id, filedata):
upload_id = str(uuid.uuid4())
def s3upload(upload_id, service_id, filedata):
s3 = resource('s3')
bucket_name = 'service-{}-{}-notify'.format(service_id, upload_id)
s3.create_bucket(Bucket=bucket_name)
contents = '\n'.join(filedata['data'])
key = s3.Object(bucket_name, upload_id)
key.put(Body=contents, ServerSideEncryption='AES256')
return upload_id
def s3download(service_id, upload_id):