@name 获取指定项目配置 @author hwliang<2021-08-09> @param project_name 项目名称 @return dict
(self, project_name)
| 2529 | return True |
| 2530 | |
| 2531 | def get_project_find(self, project_name) -> Union[bool, dict]: |
| 2532 | ''' |
| 2533 | @name 获取指定项目配置 |
| 2534 | @author hwliang<2021-08-09> |
| 2535 | @param project_name<string> 项目名称 |
| 2536 | @return dict |
| 2537 | ''' |
| 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 | ''' |
no test coverage detected