MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / get_project_find

Method get_project_find

class/projectModel/pythonModel.py:2531–2547  ·  view source on GitHub ↗

@name 获取指定项目配置 @author hwliang<2021-08-09> @param project_name 项目名称 @return dict

(self, project_name)

Source from the content-addressed store, hash-verified

2529 return True
2530
2531 def get_project_find(self, project_name) -> Union[bool, dict]:
2532 ''&#x27;
2533 @name 获取指定项目配置
2534 @author hwliang<2021-08-09>
2535 @param project_name<string> 项目名称
2536 @return dict
2537 ''&#x27;
2538 project_info = public.M('sites').where('project_type=? AND name=?', ('Python', project_name)).find()
2539 if isinstance(project_info, str):
2540 raise public.PanelError('数据库查询错误:' + project_info)
2541 if not project_info: return False
2542 project_info['project_config'] = json.loads(project_info['project_config'])
2543 if "env_list" not in project_info['project_config']:
2544 project_info['project_config']["env_list"] = []
2545 if "env_file" not in project_info['project_config']:
2546 project_info['project_config']["env_file"] = ""
2547 return project_info
2548
2549 def clear_config(self, project_name):
2550 ''&#x27;

Callers 15

re_prep_envMethod · 0.95
get_project_run_stateMethod · 0.95
StartProjectMethod · 0.95
StopProjectMethod · 0.95
RestartProjectMethod · 0.95
RemoveProjectMethod · 0.95
GetProjectInfoMethod · 0.95
clear_configMethod · 0.95
set_configMethod · 0.95
BindExtranetMethod · 0.95

Calls 4

findMethod · 0.45
whereMethod · 0.45
MMethod · 0.45
loadsMethod · 0.45

Tested by

no test coverage detected