xBis7 commented on code in PR #63932:
URL: https://github.com/apache/airflow/pull/63932#discussion_r3092190096


##########
providers/edge3/src/airflow/providers/edge3/worker_api/routes/jobs.py:
##########
@@ -92,8 +88,8 @@ def fetch(
     session.commit()
     # Edge worker does not backport emitted Airflow metrics, so export some 
metrics
     tags = {"dag_id": job.dag_id, "task_id": job.task_id, "queue": job.queue}
-    if DualStatsManager is not None:
-        DualStatsManager.incr("edge_worker.ti.start", tags=tags)
+    if AIRFLOW_V_3_2_PLUS:

Review Comment:
   In certain cases, it's better to go with `try-except` while in other cases, 
it's easier to go with version checks.
   
   But for this case, `try-except` is straight forward and will avoid the 
technical debt that the version check will create.



-- 
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]

Reply via email to