potiuk commented on code in PR #31836:
URL: https://github.com/apache/airflow/pull/31836#discussion_r1227687084
##########
airflow/cli/cli_config.py:
##########
@@ -500,6 +500,18 @@ def string_lower_type(val):
help="Drop the archive tables after exporting. Use with caution.",
action="store_true",
)
+ARG_DB_RETRY = Arg(
+ ("--retry",),
+ default=0,
+ type=positive_int(allow_zero=True),
+ help="Retry database check upon failure",
+)
+ARG_DB_RETRY_DELAY = Arg(
+ ("--retry-delay",),
+ default=1,
Review Comment:
The db check retry here is really targetted to see if the database is "up"
already - nothing more.
I think 1s is quite good as a default. We do not do a LOT - we just try to
connect to the database which takes milliseconds usually. And if it does not
work, then it usually means that the database is not yet ready and we will
simply fail on failed "connection" establishing - nothing that makes it
"heavy".
The longer the delay is, the longer we will delay startup if this command is
used as a prerequisite to start airflow component (and this is the intention).
--
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]