|
@@ -7,9 +7,9 @@ from datetime import datetime, timedelta
|
|
|
|
|
|
import logging
|
|
|
|
|
|
-path1 = '/mnt/disk001/cicv-data-closedloop/python2-pjibot-double-camera-module-pji/'
|
|
|
+path1 = '/mnt/disk001/dcl_data_process/src/python2/pjibot_delivery/'
|
|
|
|
|
|
-logging.basicConfig(filename=path1 + 'log/pjibot_callback.log', level=logging.INFO,
|
|
|
+logging.basicConfig(filename=path1 + 'log/callback.log', level=logging.INFO,
|
|
|
format='%(asctime)s - %(levelname)s - %(message)s')
|
|
|
|
|
|
key1 = 'pjibot/'
|
|
@@ -62,30 +62,35 @@ if __name__ == '__main__':
|
|
|
if 'callback.json' in str(obj1.key):
|
|
|
prefix = '/'.join(str(obj1.key).split('/')[:-1])
|
|
|
|
|
|
- done1 = False
|
|
|
- done2 = False
|
|
|
- done3 = False
|
|
|
- done4 = False
|
|
|
- done5 = False
|
|
|
- done6 = False
|
|
|
- done7 = False
|
|
|
- # print '检测是否文件完整:', prefix
|
|
|
+ file1 = False
|
|
|
+ file2 = False
|
|
|
+ file3 = False
|
|
|
+ file4 = False
|
|
|
+ file5 = False
|
|
|
+ file6 = False
|
|
|
+ file7 = False
|
|
|
+ file8 = False
|
|
|
+ file9 = False
|
|
|
for obj2 in oss2.ObjectIterator(bucket, prefix=prefix):
|
|
|
+ if '/callback.json' in str(obj2.key):
|
|
|
+ file1 = True
|
|
|
if '/ego_pji.csv' in str(obj2.key):
|
|
|
- done1 = True
|
|
|
+ file2 = True
|
|
|
if '/objects_pji.csv' in str(obj2.key):
|
|
|
- done2 = True
|
|
|
+ file3 = True
|
|
|
if '/pcd_overlook.mp4' in str(obj2.key):
|
|
|
- done3 = True
|
|
|
+ file4 = True
|
|
|
if '/pos_pji.csv' in str(obj2.key):
|
|
|
- done4 = True
|
|
|
+ file5 = True
|
|
|
+ if '/report.pdf' in str(obj2.key):
|
|
|
+ file6 = True
|
|
|
+ if '/scenario_orig.mp4' in str(obj2.key):
|
|
|
+ file7 = True
|
|
|
if '/simulation.xosc' in str(obj2.key):
|
|
|
- done5 = True
|
|
|
+ file8 = True
|
|
|
if '/trajectory_pji.csv' in str(obj2.key):
|
|
|
- done6 = True
|
|
|
- if '/report.pdf' in str(obj2.key):
|
|
|
- done7 = True
|
|
|
- if not done1 or not done2 or not done3 or not done4 or not done5 or not done6 or not done7:
|
|
|
+ file9 = True
|
|
|
+ if not file1 or not file2 or not file3 or not file4 or not file5 or not file6 or not file7 or not file8 or not file9:
|
|
|
continue
|
|
|
time.sleep(1)
|
|
|
logging.info("发送: %s", str(obj1.key))
|
|
@@ -121,7 +126,7 @@ if __name__ == '__main__':
|
|
|
logging.exception("callback报错:%s", str(e))
|
|
|
continue
|
|
|
|
|
|
- # 将时区统一(室内机器人需要加8,室外不需要了)
|
|
|
+ # 将时区统一(室外不需要需要加8,根据机器人终端的时区判断)
|
|
|
# new_date = add_hour(old_date, 8)
|
|
|
new_date = old_date
|
|
|
old_delete_list = []
|