nemo_gym.runtime_dir
nemo_gym.runtime_dir
One directory per server process for its AF_UNIX sockets, removed when the process exits.
A server with several uvicorn workers coordinates them over sockets: its checkpoint coordinator’s,
and each worker’s private session-routing socket.
They all live in /tmp/ng-<pid>-<random>/,
under /tmp rather than the configured temporary directory because AF_UNIX paths are limited to about 100 bytes
and cluster temporary directories can be long.
A clean exit removes the directory. A killed process cannot, so each new directory first removes those left behind: a directory goes only when its owner process no longer exists and none of its sockets accepts a connection. The connection check keeps a live server’s directory when the process check is wrong, as it is for a server in another PID namespace that shares /tmp, so a directory is never removed by age.
Module Contents
Functions
Data
API
Remove this user’s runtime directories whose process is gone and whose sockets are all closed.
This process’s runtime directory, created on first use.