mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 05:54:19 +01:00
Update ping.py to only print the hostname of the target database (#2125)
* Update ping.py to only print the hostname of the target database
This commit is contained in:
4
ping.py
4
ping.py
@@ -21,7 +21,7 @@ url.database = None
|
|||||||
|
|
||||||
# Wait for the database server to be available
|
# Wait for the database server to be available
|
||||||
engine = create_engine(url)
|
engine = create_engine(url)
|
||||||
print(f"Waiting for {url} to be ready")
|
print(f"Waiting for {url.host} to be ready")
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
engine.raw_connection()
|
engine.raw_connection()
|
||||||
@@ -30,5 +30,5 @@ while True:
|
|||||||
print(".", end="", flush=True)
|
print(".", end="", flush=True)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
print(f"{url} is ready")
|
print(f"{url.host} is ready")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user