mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-12 04:44:52 +00:00
fix: adjust timeout for CI
This commit is contained in:
parent
007c8302e2
commit
a1c92bd0d6
@ -145,12 +145,13 @@ def start_server_and_wait():
|
|||||||
print("Server is up and running!")
|
print("Server is up and running!")
|
||||||
return process, log_file
|
return process, log_file
|
||||||
except requests.RequestException:
|
except requests.RequestException:
|
||||||
if time.time() - start_time > 60:
|
# timeout after 3 minutes (CI can be slow sometimes)
|
||||||
|
if time.time() - start_time > 180:
|
||||||
log_file.close()
|
log_file.close()
|
||||||
with open("server_log.txt", "r") as f:
|
with open("/tmp/server_log.txt", "r") as f:
|
||||||
print("Server log:")
|
print("Server log:")
|
||||||
print(f.read())
|
print(f.read())
|
||||||
os.remove("server_log.txt")
|
os.remove("/tmp/server_log.txt")
|
||||||
raise TimeoutError("Server didn't start within 60 seconds")
|
raise TimeoutError("Server didn't start within 60 seconds")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user