Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions airflow/cli/cli_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,8 @@ def __init__(
self.flags = flags
self.kwargs = {}
for k, v in locals().items():
if v is _UNSET:
continue
if k in ("self", "flags"):
continue

self.kwargs[k] = v
if k not in ("self", "flags") and v is not _UNSET:
self.kwargs[k] = v

def add_to_parser(self, parser: argparse.ArgumentParser):
"""Add this argument to an ArgumentParser."""
Expand Down
5 changes: 2 additions & 3 deletions airflow/cli/commands/internal_api_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,10 @@ def monitor_gunicorn(gunicorn_master_pid: int):

# Reading pid of gunicorn main process as it will be different that
# the one of process spawned above.
while True:
gunicorn_master_proc_pid = None
while not gunicorn_master_proc_pid:
sleep(0.1)
gunicorn_master_proc_pid = read_pid_from_pidfile(pid_file)
if gunicorn_master_proc_pid:
break

# Run Gunicorn monitor
gunicorn_master_proc = psutil.Process(gunicorn_master_proc_pid)
Expand Down
4 changes: 2 additions & 2 deletions airflow/cli/commands/kubernetes_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ def cleanup_pods(args):
_delete_pod(pod.metadata.name, namespace)
except ApiException as e:
print(f"Can't remove POD: {e}", file=sys.stderr)
continue
print(f"No action taken on pod {pod_name}")
else:
print(f"No action taken on pod {pod_name}")
continue_token = pod_list.metadata._continue
if not continue_token:
break
Expand Down
5 changes: 2 additions & 3 deletions airflow/cli/commands/webserver_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,10 @@ def monitor_gunicorn(gunicorn_master_pid: int) -> NoReturn:

# Reading pid of gunicorn master as it will be different that
# the one of process spawned above.
while True:
gunicorn_master_proc_pid = None
while not gunicorn_master_proc_pid:
sleep(0.1)
gunicorn_master_proc_pid = read_pid_from_pidfile(pid_file)
if gunicorn_master_proc_pid:
break

# Run Gunicorn monitor
gunicorn_master_proc = psutil.Process(gunicorn_master_proc_pid)
Expand Down