INNER CODE UNIT · Python

reload_configurations

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

    async def reload_configurations(self) -> None:
        """
        Main configuration reload logic:
            - Stops disabled, expired, or deleted stream processes
            - Restarts modified streams (based on updated_at)
            - Starts newly added streams not yet tracked
        """

        async with self.lock:
            configs = await self.fetch_stream_configs()
            cfg_map = {
                self._stream_process_key(config): config for config in configs
            }
            active_configs = {
                stream_key: cfg
                for stream_key, cfg in cfg_map.items()
                if self._can_run_stream(cfg)
            }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…