You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/02/28 02:12:01 UTC
[GitHub] [airflow] mik-laj commented on a change in pull request #14519: Add CLI check for scheduler(s)
mik-laj commented on a change in pull request #14519:
URL: https://github.com/apache/airflow/pull/14519#discussion_r584218519
##########
File path: airflow/cli/cli_parser.py
##########
@@ -120,15 +120,21 @@ def add_to_parser(self, parser: argparse.ArgumentParser):
parser.add_argument(*self.flags, **self.kwargs)
-def positive_int(value):
+def positive_int(*, allow_zero):
"""Define a positive int type for an argument."""
- try:
- value = int(value)
- if value > 0:
- return value
- except ValueError:
- pass
- raise argparse.ArgumentTypeError(f"invalid positive int value: '{value}'")
+
+ def _check(value):
+ try:
+ value = int(value)
+ if allow_zero and value == 0:
+ return True
+ if value > 0:
+ return value
Review comment:
Fixed. Thanks
##########
File path: docs/apache-airflow/logging-monitoring/check-health.rst
##########
@@ -20,6 +20,11 @@
Checking Airflow Health Status
==============================
+Airflow has two methods to check the health of components. Their choice depends on the role of the component as well as what tools it uses to monitor the application.
Review comment:
Fixed. Thanks
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org