cpcc/wwwroot/cpcworker/get_availableworker.dspy
2025-07-16 14:32:09 +08:00

11 lines
371 B
Plaintext

db = DBPools()
dbname = get_module_dbname('cpcc')
ns = {
"clusterid":params_kw.clusterid
}
async with db.sqlorContext(dbname) as sor:
sql = "select cpcid,id,ip,node_status from cpcnode where cpcid = (select cpcid from cpccluster where id = ${clusterid}$) and node_status = '0';"
recs = await sor.sqlExe(sql, ns.copy())
return recs
exception(f'{sql=},{ns=}')
return []