8 lines
361 B
Plaintext
8 lines
361 B
Plaintext
# 节点心跳上报
|
|
node_id = params_kw.get('id', '')
|
|
if not node_id:
|
|
return {'status': 'error', 'message': 'Missing node id'}
|
|
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'}
|