added datetime expiration to the trades table

This commit is contained in:
Gert Wohlgemuth 2018-06-07 17:10:44 -07:00
parent 63591fae9c
commit 69e4d863c4

View File

@ -1,3 +1,4 @@
import datetime
from time import sleep
import boto3
@ -35,6 +36,7 @@ def submit(event, context):
print(event)
data = json.loads(event['body'])
data['ttl'] = (datetime.datetime.today() + datetime.timedelta(days=1)).timestamp()
client = boto3.client('sns')
topic_arn = client.create_topic(Name=os.environ['tradeTopic'])['TopicArn']