def handle(self, *args, **options):
logger.info("Getting ready to trawl Poloniex...")
schedule.every(1).minutes.do(pull_poloniex_data)
# @Alex
# run resampling for all periods and calculate indicator values
for hor_period in PERIODS_LIST:
schedule.every(hor_period / time_speed).minutes.do(_resample_then_metrics, {'period': hor_period})
keep_going = True
while keep_going:
try:
schedule.run_pending()
time.sleep(1)
except Exception as e:
logger.debug(str(e))
logger.info("Poloniex Trawl shut down.")
keep_going = False
评论列表
文章目录