diff --git a/src/lib/queues/cleanup.ts b/src/lib/queues/cleanup.ts index 42c2cec28..8e5056cad 100644 --- a/src/lib/queues/cleanup.ts +++ b/src/lib/queues/cleanup.ts @@ -8,9 +8,10 @@ export default async function () { const host = getEngine(destinationDocker.engine); // Cleanup old coolify images try { - const { stdout: images } = await asyncExecShell( + let { stdout: images } = await asyncExecShell( `DOCKER_HOST=${host} docker images coollabsio/coolify --filter before="coollabsio/coolify:latest" -q | xargs ` ); + images = images.trim(); if (images) { await asyncExecShell(`DOCKER_HOST=${host} docker rmi ${images}`); } diff --git a/src/lib/queues/index.ts b/src/lib/queues/index.ts index f2ea96347..9b93c6c0c 100644 --- a/src/lib/queues/index.ts +++ b/src/lib/queues/index.ts @@ -87,7 +87,7 @@ const cron = async () => { await queue.proxy.add('proxy', {}, { repeat: { every: 10000 } }); await queue.ssl.add('ssl', {}, { repeat: { every: dev ? 10000 : 60000 } }); - await queue.cleanup.add('cleanup', {}, { repeat: { every: 300000 } }); + await queue.cleanup.add('cleanup', {}, { repeat: { every: dev ? 10000 : 300000 } }); await queue.sslRenew.add('sslRenew', {}, { repeat: { every: 1800000 } }); const events = {