update for both tabs only when visible
parent
8ac2b3c190
commit
f5331b0bdb
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue