|
@@ -1,6 +1,6 @@
|
|
|
import pandas as pd
|
|
|
import pymysql
|
|
|
-from LIB.BACKEND import DBManager, Log
|
|
|
+from LIB.BACKEND import DBManager
|
|
|
from apscheduler.schedulers.blocking import BlockingScheduler
|
|
|
import datetime
|
|
|
from LIB.MIDDLE.CellStateEstimation.Common.V1_0_1 import DBDownload
|
|
@@ -28,7 +28,7 @@ def saftywarning_cal():
|
|
|
|
|
|
# start=time.time()
|
|
|
# now_time=datetime.datetime.now()
|
|
|
- start_time=now_time-datetime.timedelta(hours=6)
|
|
|
+ start_time=now_time-datetime.timedelta(hours=24)
|
|
|
start_time1=now_time-datetime.timedelta(days=7)
|
|
|
start_time2=now_time-datetime.timedelta(days=3)
|
|
|
start_time3=now_time-datetime.timedelta(days=1)
|
|
@@ -210,8 +210,8 @@ if __name__ == "__main__":
|
|
|
# SNnums_C7255=SNdata_C7255['SN号'].tolist()
|
|
|
# SNnums_U7255=SNdata_U7255['SN号'].tolist()
|
|
|
# SNnums=SNnums_L7255 + SNnums_C7255 + SNnums_U7255 + SNnums_6040 + SNnums_4840 + SNnums_6060
|
|
|
- SNnums = ['MGMCLN750N215N236']
|
|
|
- now_time = '2022-10-5 12:00:56'
|
|
|
+ SNnums = ['PK500A20100000811']
|
|
|
+ now_time = '2022-9-18 2:00:56'
|
|
|
now_time=datetime.datetime.strptime(now_time,'%Y-%m-%d %H:%M:%S')
|
|
|
|
|
|
# mylog=log.Mylog('log_warning.txt','error')
|
|
@@ -228,6 +228,7 @@ if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
#定时任务.......................................................................................................................................................................
|
|
|
+ saftywarning_cal()
|
|
|
scheduler = BlockingScheduler()
|
|
|
scheduler.add_job(saftywarning_cal, 'interval', seconds=6)
|
|
|
|