Skip to content

Commit

Permalink
Disabled server retries
Browse files Browse the repository at this point in the history
  • Loading branch information
KillianLucas committed Jul 31, 2024
1 parent b34715d commit 070f20a
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions interpreter/core/async_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,18 779,20 @@ def run(self, host=None, port=None, retries=5):
else:
print(f"Server will run at http://{self.host}:{self.port}")

for _ in range(retries):
try:
self.uvicorn_server.run()
break
except KeyboardInterrupt:
break
except ImportError as e:
if _ == 4: # If this is the last attempt
raise ImportError(
str(e)
"""\n\nPlease ensure you have run `pip install "open-interpreter[server]"` to install server dependencies."""
)
except:
print("An unexpected error occurred:", traceback.format_exc())
print("Server restarting.")
self.uvicorn_server.run()

# for _ in range(retries):
# try:
# self.uvicorn_server.run()
# break
# except KeyboardInterrupt:
# break
# except ImportError as e:
# if _ == 4: # If this is the last attempt
# raise ImportError(
# str(e)
# """\n\nPlease ensure you have run `pip install "open-interpreter[server]"` to install server dependencies."""
# )
# except:
# print("An unexpected error occurred:", traceback.format_exc())
# print("Server restarting.")

0 comments on commit 070f20a

Please sign in to comment.