inform in the case of worker timeout
parent
46929e949a
commit
162b541d4e
|
|
@ -6,9 +6,7 @@ import base64
|
||||||
import io
|
import io
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import gradio
|
import gradio
|
||||||
|
|
||||||
from modules import scripts, script_callbacks
|
from modules import scripts, script_callbacks
|
||||||
from modules import processing
|
from modules import processing
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
@ -23,9 +21,6 @@ from scripts.spartan.World import World, NotBenchmarked, WorldAlreadyInitialized
|
||||||
from scripts.spartan.Worker import Worker
|
from scripts.spartan.Worker import Worker
|
||||||
from modules.shared import opts
|
from modules.shared import opts
|
||||||
|
|
||||||
path_root = scripts.basedir()
|
|
||||||
|
|
||||||
|
|
||||||
# TODO implement SSDP advertisement of some sort in sdwui api to allow extension to automatically discover workers?
|
# TODO implement SSDP advertisement of some sort in sdwui api to allow extension to automatically discover workers?
|
||||||
# TODO see if the current api has some sort of UUID generation functionality.
|
# TODO see if the current api has some sort of UUID generation functionality.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import gradio
|
||||||
import requests
|
import requests
|
||||||
from typing import List
|
from typing import List
|
||||||
import math
|
import math
|
||||||
|
|
@ -248,8 +249,8 @@ class Worker:
|
||||||
"""
|
"""
|
||||||
eta = None
|
eta = None
|
||||||
|
|
||||||
# TODO handle no connection exception and remove worker (for this request) in that case
|
|
||||||
# TODO detect remote out of memory exception and restart or garbage collect instance using api?
|
# TODO detect remote out of memory exception and restart or garbage collect instance using api?
|
||||||
|
try:
|
||||||
# query memory available on worker and store for future reference
|
# query memory available on worker and store for future reference
|
||||||
if self.queried is False:
|
if self.queried is False:
|
||||||
self.queried = True
|
self.queried = True
|
||||||
|
|
@ -308,6 +309,9 @@ class Worker:
|
||||||
else:
|
else:
|
||||||
raise InvalidWorkerResponse(e)
|
raise InvalidWorkerResponse(e)
|
||||||
|
|
||||||
|
except requests.exceptions.ConnectTimeout:
|
||||||
|
print(f"\nTimed out waiting for worker '{self.uuid}' at {self}")
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def benchmark(self) -> int:
|
def benchmark(self) -> int:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue