Skip to content

Commit

Permalink
BUG: #15 addition of if statements on lines 43 and 52. Prevent crashi…
Browse files Browse the repository at this point in the history
…ng of app if any RE button is pressed more than once.
  • Loading branch information
olliviergassant committed Jun 25, 2024
1 parent f816f6e commit 0861953
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions queueUI/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,22 @@ def __init__(self):

# RE Function:
def openRunEngine(self):
"""Opens the RunEngine."""
self.RM.environment_open()
self.RM.wait_for_idle()

print(f"status = {self.RM.status().get('worker_environment_exists')}")
"""Checks the status of the RE. Then opens the RE."""
if not self.RM.status().get("worker_environment_exists"):
self.RM.environment_open()
self.RM.wait_for_idle()
print(f"status = {self.RM.status().get('worker_environment_exists')}")
else:
pass

def closeRunEngine(self):
"""Closes the RunEngine."""
self.RM.environment_close()
self.RM.wait_for_idle()

print(f"status = {self.RM.status().get('worker_environment_exists')}")
"""Checks the status of the RE. Then closes the RunEngine."""
if self.RM.status().get("worker_environment_exists"):
self.RM.environment_close()
self.RM.wait_for_idle()
print(f"status = {self.RM.status().get('worker_environment_exists')}")
else:
pass

def destroyRunEngine(self):
"""Destroys the RunEngine."""
Expand Down

0 comments on commit 0861953

Please sign in to comment.