https://github.com/apache/airflow/blob/main/airflow/dag_processing/manager.py#L773
"""Sleeps until all the processors are done."""
        for processor in self._processors.values():
            while not processor.done:
                time.sleep(0.1)
    def _collect_results_from_processor(self, processor) -> None:
        self.log.debug("Processor for %s finished", processor.file_path)
        Stats.decr("dag_processing.processes", tags={"file_path": processor.file_path, "action": "finish"})
        last_finish_time = timezone.utcnow()
        if processor.result is not None:
            num_dags, count_import_errors = processor.result
        else:
            self.log.error(
                "Processor for %s exited with return code %s.", processor.file_path, processor.exit_code
            )
            count_import_errors = -1
            num_dags = 0
        last_duration = last_finish_time - processor.start_time
        stat = DagFileStat(
            num_dags=num_dags,
            import_errors=count_import_errors,
            last_finish_time=last_finish_time,
            last_duration=last_duration,
            run_count=self.get_run_count(processor.file_path) + 1,
        )
        self._file_stats[processor.file_path] = stat
        file_name = os.path.splitext(os.path.basename(processor.file_path))[0].replace(os.sep, ".")
        Stats.timing(f"dag_processing.last_duration.{file_name}", last_duration)
    def collect_results(self) -> None: