Skip to content

Commit

Permalink
agent-smith.py will no longer start up if it is already running.
Browse files Browse the repository at this point in the history
  • Loading branch information
jreed1701 committed Mar 6, 2024
1 parent 2805d7e commit 78e2fe8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions application/gui/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ def initialize(self, with_server=False):
initialization_data = None

if with_server:
# Check that one is not already running.
is_already_there = None
is_already_there = self._globals._client.architect.get_health()
if is_already_there == "Alive":
message = QMessageBox()
message.setText(
"Error: Unable to start. This application is already running!"
)
message.exec()
return

# Launch Flask Server
self._spawn_server_on_thread()

Expand Down

0 comments on commit 78e2fe8

Please sign in to comment.