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

Method save_service_conf

mod/project/python/serviceMod.py:447–455  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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:

Callers 3

add_serviceMethod · 0.95
modify_serviceMethod · 0.95
remove_serviceMethod · 0.95

Calls 7

findMethod · 0.45
fieldMethod · 0.45
whereMethod · 0.45
MMethod · 0.45
loadsMethod · 0.45
updateMethod · 0.45
dumpsMethod · 0.45

Tested by

no test coverage detected