Replace Deck video generation with selected external service lifecycle
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user