Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Revert things

Andras Bacsai0dc521206659
diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts
index 69efb7af0e..3f4876c945 100644
--- a/apps/api/src/index.ts
+++ b/apps/api/src/index.ts
@@ -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 () => {
diff --git a/apps/api/src/jobs/deployApplication.ts b/apps/api/src/jobs/deployApplication.ts
index 261f8bd326..ca0154649b 100644
--- a/apps/api/src/jobs/deployApplication.ts
+++ b/apps/api/src/jobs/deployApplication.ts
@@ -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);
}
diff --git a/apps/api/src/jobs/test.ts b/apps/api/src/jobs/test.ts
deleted file mode 100644
index 2d0fc44c32..0000000000
--- a/apps/api/src/jobs/test.ts
+++ /dev/null
@@ -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);
-})();