Revert things

This commit is contained in:
Andras Bacsai 2022-08-25 12:25:46 +02:00
parent 7c8ffd510e
commit 0dc5212066
3 changed files with 8 additions and 33 deletions

View File

@ -104,19 +104,14 @@ fastify.listen({ port, host }, async (err: any, address: any) => {
}
console.log(`Coolify's API is listening on ${host}:${port}`);
await initServer();
// await scheduler.start('cleanupPrismaEngines');
// await scheduler.start('checkProxies');
await scheduler.start('cleanupPrismaEngines');
await scheduler.start('checkProxies');
// setInterval(async () => {
// if (!scheduler.workers.has('test')) {
// scheduler.run('test');
// }
// }, 2000)
// setInterval(async () => {
// if (!scheduler.workers.has('deployApplication')) {
// scheduler.run('deployApplication');
// }
// }, 2000)
setInterval(async () => {
if (!scheduler.workers.has('deployApplication')) {
scheduler.run('deployApplication');
}
}, 2000)
// Check for update & if no build is running
setInterval(async () => {

View File

@ -347,14 +347,9 @@ import * as buildpacks from '../lib/buildPacks';
}
});
}
await pAll.default(actions, { concurrency })
}
} catch (error) {
process.exit(0);
} finally {
} catch (error) { } finally {
await prisma.$disconnect();
process.exit(0);
}

View File

@ -1,15 +0,0 @@
import { parentPort } from 'node:worker_threads';;
(async () => {
if (parentPort) {
parentPort.on('message', async (message) => {
if (message === 'error') throw new Error('oops');
if (message === 'cancel') {
parentPort.postMessage('cancelled');
process.exit(0);
}
});
console.log('test job started');
process.exit(0)
} else process.exit(0);
})();