nemo_gym.web.browser_instance_pool
nemo_gym.web.browser_instance_pool
Lease browser instances from a pool of local processes, one X display each.
Each slot is an Xvfb display plus a nemo_gym.web.browser_instance server
started with that display, so one resources server can hold as many headed
PyAutoGUI sessions as it has slots. A slot serves one session at a time; after
release it is reused only if its instance is idle and healthy, and is
restarted otherwise. Instances exit on their own when this process dies.
Module Contents
Classes
Data
API
Serve leases from size local browser instances.
The resources server’s max_sessions should equal size; the session
manager rejects seeds beyond it before asking for a lease.
_close_task
_idle
_leased
_lifecycle_lock
_log_dir
_python
_recycling
_slots
_startup_cleanup
name
async
async
async
staticmethod
async
async
async
async
Bases: BrowserSessionError
A partial instance could not be confirmed stopped after launch failed.
Dataclass
display
index
leases
port
restarts
server
tmpdir
token
xvfb