From 9cc8e2eea23ef0f6b51bac1c8c3329e75fea1a1a Mon Sep 17 00:00:00 2001 From: Samuel Anderson <119458760+AWS-Samuel@users.noreply.github.com> Date: Fri, 29 Mar 2024 22:30:33 +0000 Subject: [PATCH] fix: only load queue environments when connected to a queue Signed-off-by: Samuel Anderson <119458760+AWS-Samuel@users.noreply.github.com> --- src/deadline/client/ui/widgets/shared_job_settings_tab.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/deadline/client/ui/widgets/shared_job_settings_tab.py b/src/deadline/client/ui/widgets/shared_job_settings_tab.py index 9549fa41..6c7986bd 100644 --- a/src/deadline/client/ui/widgets/shared_job_settings_tab.py +++ b/src/deadline/client/ui/widgets/shared_job_settings_tab.py @@ -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..." @@ -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(