Skip to content

Commit 5147fc2

Browse files
committedApr 8, 2025
Don't print db wait first attempt
1 parent 8ebae93 commit 5147fc2

File tree

1 file changed

+6
-4
lines changed
  • plain-models/plain/models

1 file changed

+6
-4
lines changed
 

Diff for: ‎plain-models/plain/models/cli.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,12 @@ def db_wait():
9494
waiting_for.append(conn.alias)
9595

9696
if waiting_for:
97-
click.secho(
98-
f"Waiting for database (attempt {attempts}): {', '.join(waiting_for)}",
99-
fg="yellow",
100-
)
97+
if attempts > 1:
98+
# After the first attempt, start printing them
99+
click.secho(
100+
f"Waiting for database (attempt {attempts}): {', '.join(waiting_for)}",
101+
fg="yellow",
102+
)
101103
time.sleep(1.5)
102104
else:
103105
click.secho(f"Database ready: {', '.join(connections)}", fg="green")

0 commit comments

Comments
 (0)