DatabaseFileMonitor¶
-
class passengersim.database.files.DatabaseFileMonitor(refresh: Callable[[], None], interval: float =
2.0)[source]¶ Bases:
objectShare one background metadata poller among the live dashboard’s runs.
- Parameters:
Notes
Filesystem calls never hold the display or registration locks. Stopping signals the daemon thread and waits briefly, so a slow network filesystem cannot delay simulation cleanup indefinitely.
Methods
__init__(refresh[, interval])close()Release all histories and stop polling when the dashboard closes.
register(key, paths)Register known paths, starting the shared poller only when needed.
remove(key)Forget a finished run and stop polling when no registered runs remain.
snapshot()Copy cached display data without touching the filesystem.
- register(key: str, paths: Iterable[Path]) None[source]¶
Register known paths, starting the shared poller only when needed.