20 lines
597 B
Python
20 lines
597 B
Python
|
|
from market_monitor_main import MarketMonitorMain
|
|||
|
|
import logging
|
|||
|
|
import time
|
|||
|
|
|
|||
|
|
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s: %(message)s")
|
|||
|
|
|
|||
|
|
|
|||
|
|
def monitor_schedule():
|
|||
|
|
market_monitor_main = MarketMonitorMain()
|
|||
|
|
logging.info("开始监控")
|
|||
|
|
while True: # 每分钟监控一次
|
|||
|
|
market_monitor_main.batch_monitor_realtime_market(
|
|||
|
|
only_output_huge_volume=True,
|
|||
|
|
only_output_rise=False,
|
|||
|
|
)
|
|||
|
|
logging.info("本次循环监控结束,等待1分钟")
|
|||
|
|
time.sleep(60)
|
|||
|
|
|
|||
|
|
if __name__ == "__main__":
|
|||
|
|
monitor_schedule()
|