Replace Deck video generation with selected external service lifecycle

This commit is contained in:
Mikei386
2026-09-29 14:24:52 +02:00
parent 71e8345606
commit badc7701fa
23 changed files with 219 additions and 636 deletions
+2 -2
View File
@@ -7,10 +7,10 @@ MANAGED_LABEL='io.athena-deck.managed=true'
ROLE_LABEL='io.athena-deck.role=application'
class DockerSupport:
def call(self,action):
def call(self,action,service=None):
path=os.environ.get('DECK_DOCKER_HELPER_SOCKET','/run/athena-deck-docker/control.sock')
with socket.socket(socket.AF_UNIX) as sock:
sock.settimeout(20);sock.connect(path);sock.sendall(json.dumps({'action':action}).encode()+b'\n')
sock.settimeout(65);sock.connect(path);sock.sendall(json.dumps({'action':action,**({'service':service} if service is not None else {})}).encode()+b'\n')
with sock.makefile('rb') as stream:raw=stream.readline(1048577)
if len(raw)>1048576:raise ValueError('Docker-Helferantwort zu groß.')
value=json.loads(raw)