From db4760100dd2fbd8439fd6b372c27d36170cd3ad Mon Sep 17 00:00:00 2001 From: aazhou Date: Fri, 9 Jun 2023 14:05:43 +0800 Subject: [PATCH] 33 --- main.py | 3 ++- settings.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index b78164c..05c5c77 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,6 @@ import schedule import bn +import settings import time import strategy.crossover as crossover @@ -20,7 +21,7 @@ for s in symbols: # 4h schedule.every(4).hours.do(crossover.strategy_run, symbol=s, interval='4h') -print('监控开始...') +print(f'监控开始... ChatID: {settings.chat_id}') while True: schedule.run_pending() time.sleep(1) \ No newline at end of file diff --git a/settings.py b/settings.py index a1eafd8..f0dae26 100644 --- a/settings.py +++ b/settings.py @@ -1,6 +1,7 @@ +import os # telegram bot key telegram_bot_key='5863718864:AAFijN65_SbbGQ0WDBggzKJw2SIcZVTVrPw' # -chat_id = "@cyber4trading" \ No newline at end of file +chat_id = os.getenv("TQ_CHAT_ID", "@cyber4trading") \ No newline at end of file