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}`); console.log(`Coolify's API is listening on ${host}:${port}`);
await initServer(); await initServer();
// await scheduler.start('cleanupPrismaEngines'); await scheduler.start('cleanupPrismaEngines');
// await scheduler.start('checkProxies'); await scheduler.start('checkProxies');
// setInterval(async () => { setInterval(async () => {
// if (!scheduler.workers.has('test')) { if (!scheduler.workers.has('deployApplication')) {
// scheduler.run('test'); scheduler.run('deployApplication');
// } }
// }, 2000) }, 2000)
// setInterval(async () => {
// if (!scheduler.workers.has('deployApplication')) {
// scheduler.run('deployApplication');
// }
// }, 2000)
// Check for update & if no build is running // Check for update & if no build is running
setInterval(async () => { setInterval(async () => {

View File

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