ashb commented on code in PR #44972:
URL: https://github.com/apache/airflow/pull/44972#discussion_r1891718529
##########
airflow/dag_processing/manager.py:
##########
@@ -298,74 +301,58 @@ class DagFileProcessorManager(LoggingMixin):
:param signal_conn: connection to communicate signal with processor agent.
"""
- def __init__(
- self,
- dag_directory: os.PathLike[str],
- max_runs: int,
- processor_timeout: timedelta,
- signal_conn: MultiprocessingConnection | None = None,
- ):
- super().__init__()
- # known files; this will be updated every `dag_dir_list_interval` and
stuff added/removed accordingly
- self._file_paths: list[str] = []
- self._file_path_queue: deque[str] = deque()
- self._max_runs = max_runs
- # signal_conn is None for dag_processor_standalone mode.
- self._direct_scheduler_conn = signal_conn
- self._parsing_start_time: float | None = None
- self._dag_directory = dag_directory
- # Set the signal conn in to non-blocking mode, so that attempting to
- # send when the buffer is full errors, rather than hangs for-ever
- # attempting to send (this is to avoid deadlocks!)
- if self._direct_scheduler_conn:
+ _dag_directory: os.PathLike[str]
Review Comment:
It was private before, so I kept it.
I explored making it public and passing down the pathlib.Path object, but it
gets messy dealing with str|Path|None at various db levels, so it's cleaner to
keep the `get_dag_directory()` returning `str|None` at this level.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]