|
@@ -8,6 +8,7 @@ import asyncio
|
|
|
import aiomysql
|
|
|
|
|
|
from applications.deal import ProcessDeal
|
|
|
+from applications.deal.process_deal_2 import ProcessDeal2
|
|
|
|
|
|
|
|
|
class TaskMySQLClient(object):
|
|
@@ -77,9 +78,24 @@ async def main():
|
|
|
await PD.deal()
|
|
|
|
|
|
|
|
|
+async def main2():
|
|
|
+ """
|
|
|
+ main2
|
|
|
+ :return:
|
|
|
+ """
|
|
|
+ TMC = TaskMySQLClient()
|
|
|
+ await TMC.init_pool()
|
|
|
+ PD = ProcessDeal2(TMC)
|
|
|
+ await PD.deal()
|
|
|
+
|
|
|
+
|
|
|
if __name__ == '__main__':
|
|
|
while True:
|
|
|
asyncio.run(main())
|
|
|
now_str = datetime.datetime.now().__str__()
|
|
|
- print("{} 请求执行完成, 等待120s".format(now_str))
|
|
|
- time.sleep(120)
|
|
|
+ print("{} 请求执行完成, 等待60s".format(now_str))
|
|
|
+ time.sleep(60)
|
|
|
+ asyncio.run(main2())
|
|
|
+ now_str = datetime.datetime.now().__str__()
|
|
|
+ print("查找历史数据{} 请求执行完成, 等待60s".format(now_str))
|
|
|
+ time.sleep(60)
|