def load_task_list(): anno_dir = './nfs/lidar_data/raw_data/' for path in os.listdir(anno_dir): item = { "marker": '', "reviewer": '', "bag_name": "bag-" + path.replace('.bag', ''), "status": 0 } if ModelUtil.exists(db_name, table_name, {"bag_name": "bag-" + path.replace('.bag', '')}): continue ModelUtil.add(db_name, table_name, item) ModelUtil.create_index(db_name, table_name, ['bag_name']) print('update done')
def update_request_work_time(): if not ModelUtil.exists(db_name, time_name, {}): ModelUtil.add(db_name, time_name, {'updated_time': timestamp()}) else: time = ModelUtil.query_one(db_name, time_name, {}, False) ModelUtil.update(db_name, time_name, time)