From 565a94ced38d0081da0ca60069e36751306b4bcb Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Tue, 9 Jan 2024 17:21:36 -0500 Subject: [PATCH] more fixes for demo Signed-off-by: Charlie Drage --- src/extension.ts | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 39992d37..e006479e 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -69,9 +69,31 @@ export async function activate(extensionContext: ExtensionContext): Promise { + console.log(containers); + containers.forEach((container) => { + if (container.Id === containerId) { + // check if container is stopped + if (container.State === 'exited') { + // remove the container + // Cant do this until we extract the logs + //extensionApi.containerEngine.deleteContainer(image.engineId, container.Id); + containerRunning = false; + } + } + } + ); + }); + await new Promise(r => setTimeout(r, 2000)); + } // Mark the task as completed progress.report({ increment: -1 }); @@ -182,7 +204,7 @@ async function logContainer(image, containerId: string, progress): Promise } catch (err) { console.error(err); // propagate the error - throw err; + // throw err; } } export async function deactivate(): Promise {