kaxil commented on a change in pull request #20470:
URL: https://github.com/apache/airflow/pull/20470#discussion_r777026185
##########
File path: airflow/stats.py
##########
@@ -65,7 +65,7 @@ def gauge(cls, stat: str, value: float, rate: int = 1, delta:
bool = False) -> N
"""Gauge stat"""
@classmethod
- def timing(cls, stat: str, dt: Union[float, datetime.timedelta]) -> None:
+ def timing(cls, stat: str, dt: Optional[Union[float, datetime.timedelta]])
-> None:
Review comment:
Instead you should have:
```diff
diff --git a/airflow/dag_processing/manager.py
b/airflow/dag_processing/manager.py
index 408bb48aa..4483c6a58 100644
--- a/airflow/dag_processing/manager.py
+++ b/airflow/dag_processing/manager.py
@@ -70,8 +70,8 @@ class DagFileStat(NamedTuple):
num_dags: int
import_errors: int
- last_finish_time: Optional[datetime]
- last_duration: Optional[float]
+ last_finish_time: datetime
+ last_duration: float
run_count: int
```
--
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]