nemo_gym.web.session_manager
nemo_gym.web.session_manager
Backend-neutral in-process web session lifecycle and concurrency control.
Module Contents
Classes
Data
API
Bind a signed Gym session cookie to one live backend instance.
Attempt every cleanup layer after a failed or cancelled seed.
Retain failed handles; only successful layers are forgotten.
A failed backend close must not destroy its thread-affine executor or release site locks while the browser could still mutate that site.
Release one lease after its parent rollout has been cancelled.
Run a backend operation on its thread-affine Playwright worker.
Own an acquire that outlived its rollout and release any late handle.
A provider may implement acquire with a blocking SDK delegated to a
thread. Cancelling the awaiting coroutine cannot stop that SDK call.
Keeping the task alive closes the race between caller timeout and the
remote session becoming billable.
A failed seed can run again only after its cleanup has finished.
Check ownership without refreshing the session’s idle timer.
Index recordings only after browser close has flushed them to disk.