async def component_add(ns={}): if not ns.get('node_id'): return { 'status': False, 'msg': '请传递所属节点node_id' } db = DBPools() async with db.sqlorContext('kboss') as sor: ns['id'] = uuid() try: await sor.C('component', ns) return { 'status': True, 'msg': '算力中心节点实例添加成功' } except Exception as e: return { 'status': False, 'msg': '算力中心节点实例添加错误, %s' % str(e) } ret = await component_add(params_kw) return ret