ashb commented on code in PR #44972:
URL: https://github.com/apache/airflow/pull/44972#discussion_r1888141738
##########
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]
+ max_runs: int
+ processor_timeout: float = attrs.field(factory=_config_int_factory("core",
"dag_file_processor_timeout"))
+ selector: selectors.BaseSelector =
attrs.field(factory=selectors.DefaultSelector)
+ _direct_scheduler_conn: MultiprocessingConnection | None =
attrs.field(alias="signal_conn", default=None)
Review Comment:
This was too matched the previous arg name + field that init put things in -
i.e. to make overall diff smaller. Happy to change if you think we should
--
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]