diff --git a/javascript/distributed.js b/javascript/distributed.js index e72f81f..ba54cae 100644 --- a/javascript/distributed.js +++ b/javascript/distributed.js @@ -6,8 +6,14 @@ function confirm_restart_workers(_) { // live updates function update() { try { - let refresh_button = document.getElementById('distributed-refresh-status') - refresh_button.click() + let currentTab = get_uiCurrentTabContent() + let buttons = document.querySelectorAll('#distributed-refresh-status') + for(let i = 0; i < buttons.length; i++) { + if(currentTab.contains(buttons[i])) { + buttons[i].click() + break + } + } } catch (e) { if (!(e instanceof TypeError)) { throw e diff --git a/scripts/spartan/world.py b/scripts/spartan/world.py index f08faf3..bae3605 100644 --- a/scripts/spartan/world.py +++ b/scripts/spartan/world.py @@ -103,7 +103,6 @@ class World: def __repr__(self): return f"{len(self._workers)} workers" - def default_batch_size(self) -> int: """the amount of images/total images requested that a worker would compute if conditions were perfect and each worker generated at the same speed. assumes one batch only""" @@ -393,7 +392,6 @@ class World: self.initialized = True logger.debug("world initialized!") - def get_workers(self): filtered: List[Worker] = [] for worker in self._workers: @@ -753,7 +751,6 @@ class World: for worker in self._workers: worker.restart() - def inject_model_dropdown_handler(self): if self.config().get('enabled', False): # TODO avoid access from config() return