pierrejeambrun commented on code in PR #67900:
URL: https://github.com/apache/airflow/pull/67900#discussion_r3461200211


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py:
##########
@@ -295,24 +315,35 @@ def create_backfill_dry_run(
     to_date = timezone.coerce_datetime(body.to_date)
 
     try:
-        backfills_dry_run = _do_dry_run(
-            dag_id=body.dag_id,
-            from_date=from_date,
-            to_date=to_date,
-            reverse=body.run_backwards,
-            reprocess_behavior=body.reprocess_behavior,
-            dag_run_conf=body.dag_run_conf,
-            session=session,
-        )
+        try:
+            backfills_dry_run = _do_dry_run(
+                dag_id=body.dag_id,
+                from_date=from_date,
+                to_date=to_date,
+                reverse=body.run_backwards,
+                reprocess_behavior=body.reprocess_behavior,
+                dag_run_conf=body.dag_run_conf,
+                session=session,
+            )
+        except OperationalError as e:
+            if "database is locked" in str(e).lower():

Review Comment:
   reuse is_lock_not_available_error instead at both places



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