def collect_dags(
            self,
            dag_folder=None,
            only_if_updated=True):
        start_dttm = datetime.now()
        dag_folder = dag_folder or self.dag_folder
        if os.path.isfile(dag_folder):
            self.process_file(dag_folder, only_if_updated=only_if_updated)
        elif os.path.isdir(dag_folder):
            patterns = []
            for root, dirs, files in os.walk(dag_folder, followlinks=True):
                ignore_file = [f for f in files if f == '.airflowignore']
                if ignore_file:
                    f = open(os.path.join(root, ignore_file[0]), 'r')
                    patterns += [p for p in f.read().split('\n') if p]
                    f.close()
                for f in files:
                    try:
                        filepath = os.path.join(root, f)
                        if not os.path.isfile(filepath):
                            continue
                        mod_name, file_ext = os.path.splitext(
                            os.path.split(filepath)[-1])
                        if file_ext != '.py':
                            continue
                        if not any(
                                [re.findall(p, filepath) for p in patterns]):
                            self.process_file(
                                filepath, only_if_updated=only_if_updated)
                    except Exception as e:
                        logging.warning(e)
        Stats.gauge(
            'collect_dags', (datetime.now() - start_dttm).total_seconds(), 1)
        Stats.gauge(
            'dagbag_size', len(self.dags), 1)
        Stats.gauge(
            'dagbag_import_errors', len(self.import_errors), 1)
Stop the named broadcast.
dataset/ETHPy150Open airbnb/airflow/airflow/models.py/DagBag.collect_dags--crossover with--dataset/ETHPy150Open disqus/playa/playa/lib/vlc.py/Instance.vlm_stop_media