MCPcopy Create free account
hub / github.com/cocoindex-io/cocoindex-code / daemon_runtime_dir

Function daemon_runtime_dir

src/cocoindex_code/_daemon_paths.py:16–31  ·  view source on GitHub ↗

Return the directory that holds daemon runtime artifacts. Holds ``daemon.sock``, ``daemon.pid``, ``daemon.log``. Kept separate from the user-settings dir so that (e.g. in Docker) the socket can live on the container's native filesystem while ``global_settings.yml`` lives on a bind m

()

Source from the content-addressed store, hash-verified

14
15
16def daemon_runtime_dir() -> Path:
17 """Return the directory that holds daemon runtime artifacts.
18
19 Holds ``daemon.sock``, ``daemon.pid``, ``daemon.log``. Kept separate from
20 the user-settings dir so that (e.g. in Docker) the socket can live on the
21 container's native filesystem while ``global_settings.yml`` lives on a
22 bind mount.
23
24 Override with ``COCOINDEX_CODE_RUNTIME_DIR``. Defaults to
25 :func:`user_settings_dir` for backward compatibility — non-Docker users
26 see identical behavior to before the split.
27 """
28 override = os.environ.get("COCOINDEX_CODE_RUNTIME_DIR")
29 if override:
30 return Path(override)
31 return user_settings_dir()
32
33
34def connection_family() -> str:

Callers 7

start_daemonFunction · 0.85
daemon_socket_pathFunction · 0.85
daemon_pid_pathFunction · 0.85
daemon_log_pathFunction · 0.85
run_daemonFunction · 0.85

Calls 1

user_settings_dirFunction · 0.85