INNER CODE UNIT · Python

_stream_needs_restart

yihong1120/Construction-Hazard-Detection · main.py:669

    def _stream_needs_restart(
        proc_info: dict[str, Any],
        cfg: StreamConfig,
        worker_broker_replaced: bool,
    ) -> bool:
        """Return True when an existing stream should be relaunched."""
        proc = proc_info['process']
        return (
            worker_broker_replaced
            or cfg['updated_at'] != proc_info['updated_at']
            or not proc.is_alive()
        )

    @staticmethod
    def _restart_reason(
        proc_info: dict[str, Any],
        cfg: StreamConfig,
    ) -> str:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…