添加native.api源码;临时处理run_simulation中iot数据库name的判断
This commit is contained in:
@@ -1233,9 +1233,14 @@ def run_simulation(
|
||||
# print(node_result)
|
||||
# 存储
|
||||
starttime = time.time()
|
||||
# 临时处理输入的name问题,后续需要优化,需要传递/获取iot数据库的名字
|
||||
if name.find("_") != -1:
|
||||
db_name = name.split("_")[2]
|
||||
else:
|
||||
db_name = name
|
||||
if simulation_type.upper() == "REALTIME":
|
||||
TimescaleInternalStorage.store_realtime_simulation(
|
||||
node_result, link_result, modify_pattern_start_time, db_name=name
|
||||
node_result, link_result, modify_pattern_start_time, db_name=db_name
|
||||
)
|
||||
elif simulation_type.upper() == "EXTENDED":
|
||||
TimescaleInternalStorage.store_scheme_simulation(
|
||||
@@ -1245,7 +1250,7 @@ def run_simulation(
|
||||
link_result,
|
||||
modify_pattern_start_time,
|
||||
num_periods_result,
|
||||
db_name=name,
|
||||
db_name=db_name,
|
||||
)
|
||||
endtime = time.time()
|
||||
logging.info("store time: %f", endtime - starttime)
|
||||
|
||||
Reference in New Issue
Block a user