From f3e8d823b2f414bef6f3fa4e24af26ed40c3df87 Mon Sep 17 00:00:00 2001 From: Gert Wohlgemuth Date: Fri, 8 Jun 2018 20:55:38 -0700 Subject: [PATCH] converting storage to int type for ttl --- freqtrade/aws/trade.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/aws/trade.py b/freqtrade/aws/trade.py index a066f1513..1ff9f23c6 100644 --- a/freqtrade/aws/trade.py +++ b/freqtrade/aws/trade.py @@ -21,8 +21,9 @@ def store(event, context): print("storing {} data trade results".format(len(x))) for x in data: + x['ttl'] = int((datetime.datetime.today() + datetime.timedelta(days=1)).timestamp()) print("storing data: {}".format(x)) - x['ttl'] = (datetime.datetime.today() + datetime.timedelta(days=1)).timestamp() + sleep(0.5) # throttle to not overwhelm the DB, lambda is cheaper than dynamo get_trade_table().put_item(Item=x)