This is an automated email from the ASF dual-hosted git repository.

jedcunningham pushed a commit to branch v2-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 36920077f790f4202238f1bf27608714f0794f25
Author: Kanthi <[email protected]>
AuthorDate: Tue Dec 28 16:15:31 2021 -0500

    20496 fix port standalone mode (#20505)
    
    (cherry picked from commit f743e46c5a4fdd0b76fea2d07729b744644fc416)
---
 airflow/cli/commands/standalone_command.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/airflow/cli/commands/standalone_command.py 
b/airflow/cli/commands/standalone_command.py
index 37d38cb..82a082e 100644
--- a/airflow/cli/commands/standalone_command.py
+++ b/airflow/cli/commands/standalone_command.py
@@ -81,6 +81,8 @@ class StandaloneCommand:
             command=["triggerer"],
             env=env,
         )
+
+        self.web_server_port = conf.getint('webserver', 'WEB_SERVER_PORT', 
fallback=8080)
         # Run subcommand threads
         for command in self.subcommands.values():
             command.start()
@@ -206,7 +208,11 @@ class StandaloneCommand:
         Detects when all Airflow components are ready to serve.
         For now, it's simply time-based.
         """
-        return self.port_open(8080) and self.job_running(SchedulerJob) and 
self.job_running(TriggererJob)
+        return (
+            self.port_open(self.web_server_port)
+            and self.job_running(SchedulerJob)
+            and self.job_running(TriggererJob)
+        )
 
     def port_open(self, port):
         """

Reply via email to