Skip to content

Commit

Permalink
fix: only load queue environments when connected to a queue (#264)
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Anderson <119458760+AWS-Samuel@users.noreply.github.com>
  • Loading branch information
AWS-Samuel committed Mar 29, 2024
1 parent 1a6b8c8 commit ea1e617
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/deadline/client/ui/widgets/shared_job_settings_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ def refresh_queue_parameters(self):
"""
If the default queue id has changed, refresh the queue parameters.
"""
farm_id = get_setting("defaults.farm_id")
queue_id = get_setting("defaults.queue_id")
if not farm_id or not queue_id:
self.queue_parameters_box.rebuild_ui(async_loading_state="")
return # If the user has not selected a farm or queue ID, don't try to load
if self.queue_parameters_box.async_loading_state or queue_id != self.queue_id:
self.queue_parameters_box.rebuild_ui(
async_loading_state="Reloading Queue Environments..."
Expand Down Expand Up @@ -156,6 +160,10 @@ def _start_load_queue_parameters_thread(self):
"""
self.farm_id = farm_id = get_setting("defaults.farm_id")
self.queue_id = queue_id = get_setting("defaults.queue_id")
if not self.farm_id or not self.queue_id:
# If the user has not selected a farm or queue ID, don't bother starting
# the thread.
return
self.__refresh_queue_parameters_id += 1
self.canceled = CancelationFlag()
self.__refresh_queue_parameters_thread = threading.Thread(
Expand Down

0 comments on commit ea1e617

Please sign in to comment.