Commit a93d550 1 parent 3136368 commit a93d550 Copy full SHA for a93d550
File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,9 @@ killed_task_cleanup_time = 60
173
173
# `airflow trigger_dag -c`, the key-value pairs will override the existing ones in params.
174
174
dag_run_conf_overrides_params = False
175
175
176
+ # The number of retries each task is going to have by default. Can be overridden at dag or task level.
177
+ default_task_retries = 0
178
+
176
179
[cli]
177
180
# In what way should the cli access the API. The LocalClient will use the
178
181
# database directly, while the json_client will use the api running on the
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ enable_xcom_pickling = False
51
51
killed_task_cleanup_time = 5
52
52
secure_mode = False
53
53
hostname_callable = socket:getfqdn
54
+ default_task_retries = 0
54
55
55
56
[cli]
56
57
api_client = airflow.api.client.local_client
Original file line number Diff line number Diff line change @@ -297,9 +297,12 @@ def get_dag(self, dag_id):
297
297
dag .last_loaded < orm_dag .last_expired
298
298
)
299
299
):
300
+
300
301
# Reprocess source file
302
+ # TODO: remove the below hack to find relative dag location in webserver
303
+ filepath = dag .fileloc if dag else orm_dag .fileloc
301
304
found_dags = self .process_file (
302
- filepath = orm_dag . fileloc , only_if_updated = False )
305
+ filepath = filepath , only_if_updated = False )
303
306
304
307
# If the source file no longer exports `dag_id`, delete it from self.dags
305
308
if found_dags and dag_id in [found_dag .dag_id for found_dag in found_dags ]:
@@ -2342,7 +2345,7 @@ def __init__(
2342
2345
email = None ,
2343
2346
email_on_retry = True ,
2344
2347
email_on_failure = True ,
2345
- retries = 0 ,
2348
+ retries = None ,
2346
2349
retry_delay = timedelta (seconds = 300 ),
2347
2350
retry_exponential_backoff = False ,
2348
2351
max_retry_delay = None ,
@@ -2416,7 +2419,8 @@ def __init__(
2416
2419
self
2417
2420
)
2418
2421
self ._schedule_interval = schedule_interval
2419
- self .retries = retries
2422
+ self .retries = retries if retries is not None else \
2423
+ configuration .conf .getint ('core' , 'default_task_retries' , fallback = 0 )
2420
2424
self .queue = queue
2421
2425
self .pool = pool
2422
2426
self .sla = sla
You can’t perform that action at this time.
0 commit comments