9 lines
379 B
Plaintext
9 lines
379 B
Plaintext
# 节点心跳上报
|
|
node_id = params_kw.get('id', '')
|
|
if not node_id:
|
|
return {'status': 'error', 'message': 'Missing node id'}
|
|
import datetime
|
|
async with DBPools().sqlorContext('pccs') as sor:
|
|
await sor.U('compute_node', {'id': node_id}, {'last_heartbeat': datetime.datetime.now().isoformat(), 'updated_at': datetime.datetime.now().isoformat()})
|
|
return {'status': 'ok'}
|