|
|
@ -496,9 +496,9 @@ class MetataskService: |
|
|
|
for config in processConfigList: |
|
|
|
# mysql表字段 |
|
|
|
if config.ac_target=='0': |
|
|
|
modified_json_str = config.taskDefinitionJson.replace("16199683466336", str_list[0]).replace("16199683466337", str_list[1]).replace("16199683466338", str_list[2]).replace("'dash_test_w'", f"'{page_object.dbSName}'").replace("'mysql_conn'", f"'{page_object.dbRName}'") |
|
|
|
modified_json_str2=config.taskRelationJson.replace("16199683466336", str_list[0]).replace("16199683466337", str_list[1]).replace("16199683466338", str_list[2]) |
|
|
|
modified_json_str3=config.locations.replace("16199683466336", str_list[0]).replace("16199683466337", str_list[1]).replace("16199683466338", str_list[2]) |
|
|
|
modified_json_str = config.taskDefinitionJson.replace("16699723296864", str_list[0]).replace("16699723296865", str_list[1]).replace("16699723296866", str_list[2]).replace("'ORCL_USER'", f"'{page_object.dbSName}'").replace("'orcl_conn'", f"'{page_object.dbRName}'") |
|
|
|
modified_json_str2=config.taskRelationJson.replace("16699723296864", str_list[0]).replace("16699723296865", str_list[1]).replace("16699723296866", str_list[2]) |
|
|
|
modified_json_str3=config.locations.replace("16699723296864", str_list[0]).replace("16699723296865", str_list[1]).replace("16699723296866", str_list[2]) |
|
|
|
metaprocessconfig_dict = MetaprocessconfigModel(taskDefinitionJson=modified_json_str,# 替换taskDefinitionJson |
|
|
|
description=page_object.remark, # 替换工作流备注 |
|
|
|
locations=modified_json_str3,# 替换locations |
|
|
@ -526,9 +526,9 @@ class MetataskService: |
|
|
|
message += ", " |
|
|
|
message += page_object.metatask_name + "-表字段采集新增失败" |
|
|
|
if config.ac_target=='1': |
|
|
|
modified_json_str = config.taskDefinitionJson.replace("16286410625888", str_list[0]).replace("16286410625889", str_list[1]).replace("16286410625890", str_list[2]).replace("16286410625891", str_list[3]).replace("'dash_test_w'", f"'{page_object.dbSName}'").replace("'mysql_conn'", f"'{page_object.dbRName}'").replace("mysql_conn dash_test_w", f"{page_object.dbRName} {page_object.dbSName}") |
|
|
|
modified_json_str2=config.taskRelationJson.replace("16286410625888", str_list[0]).replace("16286410625889", str_list[1]).replace("16286410625890", str_list[2]).replace("16286410625891", str_list[3]) |
|
|
|
modified_json_str3=config.locations.replace("16286410625888", str_list[0]).replace("16286410625889", str_list[1]).replace("16286410625890", str_list[2]).replace("16286410625891", str_list[3]) |
|
|
|
modified_json_str = config.taskDefinitionJson.replace("16699841738592", str_list[0]).replace("16699841738593", str_list[1]).replace("16699841738594", str_list[2]).replace("16699841738595", str_list[3]).replace("'ORCL_USER'", f"'{page_object.dbSName}'").replace("'orcl_conn'", f"'{page_object.dbRName}'") |
|
|
|
modified_json_str2=config.taskRelationJson.replace("16699841738592", str_list[0]).replace("16699841738593", str_list[1]).replace("16699841738594", str_list[2]).replace("16699841738595", str_list[3]) |
|
|
|
modified_json_str3=config.locations.replace("16699841738592", str_list[0]).replace("16699841738593", str_list[1]).replace("16699841738594", str_list[2]).replace("16699841738595", str_list[3]) |
|
|
|
metaprocessconfig_dict = MetaprocessconfigModel(taskDefinitionJson=modified_json_str,# 替换taskDefinitionJson |
|
|
|
description=page_object.remark, # 替换工作流备注 |
|
|
|
locations=modified_json_str3,# 替换locations |
|
|
@ -585,9 +585,9 @@ class MetataskService: |
|
|
|
for config in processConfigList: |
|
|
|
# mysql表字段 |
|
|
|
if config.ac_target=='0': |
|
|
|
modified_json_str = config.taskDefinitionJson.replace("16199683466336", str_list[0]).replace("16199683466337", str_list[1]).replace("16199683466338", str_list[2]).replace("'dash_test_w'", f"'{page_object.dbSName}'").replace("'mysql_conn'", f"'{page_object.dbRName}'") |
|
|
|
modified_json_str2=config.taskRelationJson.replace("16199683466336", str_list[0]).replace("16199683466337", str_list[1]).replace("16199683466338", str_list[2]) |
|
|
|
modified_json_str3=config.locations.replace("16199683466336", str_list[0]).replace("16199683466337", str_list[1]).replace("16199683466338", str_list[2]) |
|
|
|
modified_json_str = config.taskDefinitionJson.replace("16699625480160", str_list[0]).replace("16699625480161", str_list[1]).replace("16699625480162", str_list[2]).replace("'MYSCHEMA'", f"'{page_object.dbSName}'").replace("'db2_conn'", f"'{page_object.dbRName}'") |
|
|
|
modified_json_str2=config.taskRelationJson.replace("16699625480160", str_list[0]).replace("16699625480161", str_list[1]).replace("16699625480162", str_list[2]) |
|
|
|
modified_json_str3=config.locations.replace("16699625480160", str_list[0]).replace("16699625480161", str_list[1]).replace("16699625480162", str_list[2]) |
|
|
|
metaprocessconfig_dict = MetaprocessconfigModel(taskDefinitionJson=modified_json_str,# 替换taskDefinitionJson |
|
|
|
description=page_object.remark, # 替换工作流备注 |
|
|
|
locations=modified_json_str3,# 替换locations |
|
|
@ -601,7 +601,6 @@ class MetataskService: |
|
|
|
).model_dump(exclude_unset=True, by_alias=True) |
|
|
|
form_data = {key: str(value) for key, value in metaprocessconfig_dict.items()} |
|
|
|
response_post0 = requests.post(url2, headers=headers2, data=form_data, verify=False) |
|
|
|
# text= '{"code":0,"msg":"success","data":{"id":null,"code":16244510692320,"name":"测试2250-表字段采集","version":0,"releaseState":null,"projectCode":15094503753824,"description":"111","globalParams":"[]","globalParamList":null,"globalParamMap":{},"createTime":"2025-01-08 12:50:39","updateTime":"2025-01-08 12:50:39","flag":"YES","userId":1,"userName":null,"projectName":null,"locations":"[{\\"taskCode\\":16244510678624,\\"x\\":334,\\"y\\":265},{\\"taskCode\\":16244510678625,\\"x\\":334,\\"y\\":390},{\\"taskCode\\":16244510678626,\\"x\\":687,\\"y\\":335}]","scheduleReleaseState":null,"timeout":0,"tenantId":1,"tenantCode":null,"modifyBy":null,"warningGroupId":0,"executionType":"PARALLEL"},"failed":false,"success":true}' |
|
|
|
text= response_post0.text |
|
|
|
responsJson = json.loads(text) |
|
|
|
if responsJson['msg'] == 'success': |
|
|
@ -615,9 +614,9 @@ class MetataskService: |
|
|
|
message += ", " |
|
|
|
message += page_object.metatask_name + "-表字段采集新增失败" |
|
|
|
if config.ac_target=='1': |
|
|
|
modified_json_str = config.taskDefinitionJson.replace("16286410625888", str_list[0]).replace("16286410625889", str_list[1]).replace("16286410625890", str_list[2]).replace("16286410625891", str_list[3]).replace("'dash_test_w'", f"'{page_object.dbSName}'").replace("'mysql_conn'", f"'{page_object.dbRName}'").replace("mysql_conn dash_test_w", f"{page_object.dbRName} {page_object.dbSName}") |
|
|
|
modified_json_str2=config.taskRelationJson.replace("16286410625888", str_list[0]).replace("16286410625889", str_list[1]).replace("16286410625890", str_list[2]).replace("16286410625891", str_list[3]) |
|
|
|
modified_json_str3=config.locations.replace("16286410625888", str_list[0]).replace("16286410625889", str_list[1]).replace("16286410625890", str_list[2]).replace("16286410625891", str_list[3]) |
|
|
|
modified_json_str = config.taskDefinitionJson.replace("16699623866592", str_list[0]).replace("16699623866593", str_list[1]).replace("16699623866594", str_list[2]).replace("16699623866595", str_list[3]).replace("'MYSCHEMA'", f"'{page_object.dbSName}'").replace("'db2_conn'", f"'{page_object.dbRName}'") |
|
|
|
modified_json_str2=config.taskRelationJson.replace("16699623866592", str_list[0]).replace("16699623866593", str_list[1]).replace("16699623866594", str_list[2]).replace("16699623866595", str_list[3]) |
|
|
|
modified_json_str3=config.locations.replace("16699623866592", str_list[0]).replace("16699623866593", str_list[1]).replace("16699623866594", str_list[2]).replace("16699623866595", str_list[3]) |
|
|
|
metaprocessconfig_dict = MetaprocessconfigModel(taskDefinitionJson=modified_json_str,# 替换taskDefinitionJson |
|
|
|
description=page_object.remark, # 替换工作流备注 |
|
|
|
locations=modified_json_str3,# 替换locations |
|
|
@ -771,7 +770,7 @@ class MetataskService: |
|
|
|
for config in processConfigList: |
|
|
|
# POSTGRESQL表字段 |
|
|
|
if config.ac_target=='0': |
|
|
|
modified_json_str = config.taskDefinitionJson.replace("16688213802592", str_list[0]).replace("16688213802593", str_list[1]).replace("16688213802594", str_list[2]) |
|
|
|
modified_json_str = config.taskDefinitionJson.replace("16688213802592", str_list[0]).replace("16688213802593", str_list[1]).replace("16688213802594", str_list[2]).replace("'public'", f"'{page_object.dbSName}'").replace("'pg_conn'", f"'{page_object.dbRName}'") |
|
|
|
modified_json_str2=config.taskRelationJson.replace("16688213802592", str_list[0]).replace("16688213802593", str_list[1]).replace("16688213802594", str_list[2]) |
|
|
|
modified_json_str3=config.locations.replace("16688213802592", str_list[0]).replace("16688213802593", str_list[1]).replace("16688213802594", str_list[2]) |
|
|
|
metaprocessconfig_dict = MetaprocessconfigModel(taskDefinitionJson=modified_json_str,# 替换taskDefinitionJson |
|
|
@ -800,7 +799,7 @@ class MetataskService: |
|
|
|
message += ", " |
|
|
|
message += page_object.metatask_name + "-表字段采集新增失败" |
|
|
|
elif config.ac_target=='1': |
|
|
|
modified_json_str = config.taskDefinitionJson.replace("16688477124320", str_list[0]).replace("16688477124321", str_list[1]).replace("16688477124322", str_list[2]).replace("16688477124323", str_list[3]) |
|
|
|
modified_json_str = config.taskDefinitionJson.replace("16688477124320", str_list[0]).replace("16688477124321", str_list[1]).replace("16688477124322", str_list[2]).replace("16688477124323", str_list[3]).replace("'public'", f"'{page_object.dbSName}'").replace("'pg_conn'", f"'{page_object.dbRName}'") |
|
|
|
modified_json_str2=config.taskRelationJson.replace("16688477124320", str_list[0]).replace("16688477124321", str_list[1]).replace("16688477124322", str_list[2]).replace("16688477124323", str_list[3]) |
|
|
|
modified_json_str3=config.locations.replace("16688477124320", str_list[0]).replace("16688477124321", str_list[1]).replace("16688477124322", str_list[2]).replace("16688477124323", str_list[3]) |
|
|
|
metaprocessconfig_dict = MetaprocessconfigModel(taskDefinitionJson=modified_json_str,# 替换taskDefinitionJson |
|
|
|