fix: align peer_bus signature, bot presence SQL, XML-RPC timeout
- All specialist agents: handle_peer_request(request_type, params, directive_id) replaces handle_peer_request(request: dict) so callers pass structured args - ab_ai_bot: force-write bus_presence.status via SQL so Odoo 18 WebSocket presence shows the correct colour immediately (ORM compute does not trigger on last_poll writes) - odoo_client: wrap XML-RPC executor calls in asyncio.wait_for to enforce timeout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -71,9 +71,15 @@ class OdooClient:
|
||||
await self._pg_pool.close()
|
||||
|
||||
async def _xmlrpc_call(self, proxy, method, *args):
|
||||
loop = asyncio.get_event_loop()
|
||||
loop = asyncio.get_running_loop()
|
||||
fn = getattr(proxy, method)
|
||||
return await loop.run_in_executor(_executor, fn, *args)
|
||||
try:
|
||||
return await asyncio.wait_for(
|
||||
loop.run_in_executor(_executor, fn, *args),
|
||||
timeout=self._timeout,
|
||||
)
|
||||
except asyncio.TimeoutError:
|
||||
raise socket.timeout(f'Odoo XML-RPC timeout after {self._timeout}s')
|
||||
|
||||
async def _authenticate(self):
|
||||
async with self._auth_lock:
|
||||
|
||||
Reference in New Issue
Block a user