Unify separation tools and add exclusive control mode
This commit is contained in:
1 parent
088f5f6f91
commit
bd5aea7656
13 files changed
+81
-28
No files matched your search
@@ -131,6 +131,7 @@ class Server(ThreadingHTTPServer):
|
||||
self.ltx_original_runtime=LTXOriginalRuntime(self.catalog.root.parent/'ltx-original-runtime',self.image_runtime)
|
||||
self.video=VideoRuntimes(self.scheduler,stop_gpu_work,self.docker,self.catalog.root.parent/'video',self.catalog,self.profiles,self.image_runtime,original_runtime=self.ltx_original_runtime)
|
||||
self.endpoint.video=self.video
|
||||
self.video.separator_status=lambda:dict(self.separator_runtime.status(),worker=self.separator_tests.status())
|
||||
self.video.music_profiles=lambda:[dict(id=p['id'],name=p['name']) for p in self.endpoint.rows() if p['kind']=='music' and p['enabled'] and p['runnable']]
|
||||
self.profiles.video_runtime_ready=lambda:self.image_runtime.status().get("installed",False)
|
||||
from dashboard_data import Dashboard
|
||||
@@ -573,7 +574,7 @@ class Handler(BaseHTTPRequestHandler):
|
||||
data=self.read_json()
|
||||
if self.path.endswith('/runtime') and set(data)=={'runtime'}:return self.respond(self.server.video.select_runtime(data['runtime']))
|
||||
if self.path.endswith('/service') and set(data)=={'id'}:return self.respond(self.server.video.select(data['id']))
|
||||
if set(data)!={'mode'}:raise ValueError('Nur Modus llm, video oder music erwartet.')
|
||||
if set(data)!={'mode'}:raise ValueError('Nur Modus llm, video, music oder separator erwartet.')
|
||||
return self.respond(self.server.video.switch(data['mode']))
|
||||
except (OSError,ValueError) as exc:return self.respond({'error':str(exc)},400)
|
||||
if self.path in ('/api/v1/endpoint/start','/api/v1/endpoint/stop','/api/v1/endpoint/config','/api/v1/endpoint/profile'):
|
||||
|
||||
Reference in new issue
Block a user