| 445 | return uuid4().hex[::3] |
| 446 | |
| 447 | def save_service_conf(self) -> Optional[str]: |
| 448 | data = public.M("sites").where( |
| 449 | 'project_type=? AND name=? ', ('Python', self.project_name) |
| 450 | ).field('id,project_config').find() |
| 451 | if not data: |
| 452 | return "未查询到网站信息" |
| 453 | data['project_config'] = json.loads(data['project_config']) |
| 454 | data['project_config']['services'] = self.other_services |
| 455 | public.M("sites").where('id=?', (data['id'],)).update({'project_config': json.dumps(data['project_config'])}) |
| 456 | |
| 457 | def add_service(self, service_conf: dict) -> Optional[str]: |
| 458 | try: |