jsonrpc_err_in_rent: much needed refinements to .data._web_bs.open_jsonrpc_session() #36

Open
goodboy wants to merge 3 commits from jsonrpc_err_in_rent into tsp_gaps

Namely ensuring error propagation to the parent trio.Task as well as cleaning out old unused parameters and exposing the underlying wy timeout to avoid breaking non-chatty sessions (like for options mkts)!

Deats,

  • a slight rework to the .data._web_bs.open_jsonrpc_session() to ensure any recved IPC msg errors are relayed to and raised in the parent task.
  • doc-string and cleanup of old params.
  • making the underlying websocket timeout a float with default float('inf') to avoid timeout-caused connection resets which break rpc sesh.
Namely ensuring error propagation to the parent `trio.Task` as well as cleaning out old unused parameters and exposing the underlying wy timeout to avoid breaking non-chatty sessions (like for options mkts)! #### Deats, - a slight rework to the `.data._web_bs.open_jsonrpc_session()` to ensure any recved IPC msg errors are relayed to and raised in the parent task. - doc-string and cleanup of old params. - making the underlying websocket timeout a `float` with default `float('inf')` to avoid timeout-caused connection resets which break rpc sesh.
goodboy added 3 commits 2025-02-20 16:25:20 +00:00
5633f5614d Doc-n-clean `.data._web_bs.open_jsonrpc_session()`
Add a doc-string reflecting recent refinements, drop all the old hook
params, rename `n: trio.Nursery` -> `tn` for "task nursery" fitting with
code base's naming style.
e391c896f8 Mk jsronrpc's underlying ws timeout `float('inf')`
Since currently we're only using this IPC subsys for `deribit`, and
generally speaking we're primarly supporting options markets (which are
fairly "slow moving"), flip to a default of NOT resetting the `NoBsWs`
on timeout since doing so normally breaks the jsron-rpc IPC session.
Without a proper `fixture` passed to `open_autorecon_ws()` (which we
should eventually implement!!) relying on a timeout-to-reset more or
less will just cause breakage issues - a proper reconnect sequence must
be implemented before using that feature.

Deats,
- expose and proxy through the `msg_recv_timeout` from
  `open_jsonrpc_session()` into the underlying `open_autorecon_ws()`
  call.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b jsonrpc_err_in_rent tsp_gaps
git pull origin jsonrpc_err_in_rent

Step 2:

Merge the changes and update on Gitea.
git checkout tsp_gaps
git merge --no-ff jsonrpc_err_in_rent
git push origin tsp_gaps
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: pikers/piker#36
There is no content yet.