kboss/b/cpcc/cpcworker/delete_cpcworker.dspy
2025-07-16 14:27:17 +08:00

35 lines
919 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

async def delete_cpcworker(params_kw={}):
ns = {
'id':params_kw['id'],
}
db = DBPools()
# dbname = await rfexe('get_module_dbname', 'cpcc')
dbname = 'kboss'
async with db.sqlorContext(dbname) as sor:
r = await sor.D('cpccluster', ns)
debug('delete success');
return {
"widgettype":"Message",
"options":{
"title":"Delete Success",
"timeout":3,
"cwidth":16,
"cheight":9,
"message":"ok记得把关联的节点都解除占用状态 ~"
}
}
debug('Delete failed');
return {
"widgettype":"Error",
"options":{
"title":"Delete Error",
"timeout":3,
"cwidth":16,
"cheight":9,
"message":"failed"
}
}
ret = await delete_cpcworker(params_kw)
return ret