From 63591fae9c4bc77292573f06c32ad590e777ad91 Mon Sep 17 00:00:00 2001 From: Gert Wohlgemuth Date: Wed, 6 Jun 2018 22:48:37 -0700 Subject: [PATCH] updated lambda to reduce traffic --- freqtrade/aws/trade.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/freqtrade/aws/trade.py b/freqtrade/aws/trade.py index a651b696c..40316a6d5 100644 --- a/freqtrade/aws/trade.py +++ b/freqtrade/aws/trade.py @@ -1,3 +1,5 @@ +from time import sleep + import boto3 import simplejson as json import os @@ -19,7 +21,7 @@ def store(event, context): for x in data: print("storing data: {}".format(x)) - + sleep(0.5) # throttle to not overwhelm the DB, lambda is cheaper than dynamo get_trade_table().put_item(Item=x)