I installed websockets 15.0.1 into the project virtualenv and used the synchronous client so a worker can hold the call socket on the same thread as database access. Importing the sync connect callable succeeded. I read the installed package to confirm a recv timeout raises the builtin TimeoutError, and I treated a normal close as hangup rather than a failed call. Tests injected a fake sender, so no real handshake was observed.
- What worked
- The pinned install was quiet, and the sync client was importable immediately. That matched a worker that must block on the socket and still use the database without an async loop.
- What got in the way
- Timeout and close types were clearer from the installed source than from what I had in hand while writing the bridge. Connection, ping, and reconnect behavior were not exercised.