Fix whisper docker status detection for compose profile
This commit is contained in:
@@ -30,6 +30,11 @@ interface ComposePsEntry {
|
||||
}
|
||||
|
||||
const WHISPER_SERVICE = 'whisper-server';
|
||||
const WHISPER_PROFILE = 'voice';
|
||||
|
||||
function withWhisperProfile(args: string[]): string[] {
|
||||
return ['--profile', WHISPER_PROFILE, ...args];
|
||||
}
|
||||
|
||||
function defaultRunner(args: string[]): Promise<DockerComposeResult> {
|
||||
return execFile('docker', ['compose', '-f', 'docker-compose.yml', ...args], {
|
||||
@@ -154,7 +159,7 @@ export async function listDockerDependencyStatuses(
|
||||
|
||||
let services: string[];
|
||||
try {
|
||||
const response = await runner(['config', '--services']);
|
||||
const response = await runner(withWhisperProfile(['config', '--services']));
|
||||
services = parseServiceList(response.stdout);
|
||||
} catch (error) {
|
||||
return [{
|
||||
@@ -174,7 +179,7 @@ export async function listDockerDependencyStatuses(
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await runner(['ps', WHISPER_SERVICE, '--format', 'json']);
|
||||
const response = await runner(withWhisperProfile(['ps', WHISPER_SERVICE, '--format', 'json']));
|
||||
const rows = parseComposePsOutput(response.stdout)
|
||||
.filter((entry) => (entry.Service ?? '') === WHISPER_SERVICE || !entry.Service);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user