debug: remove worker jobs
This commit is contained in:
parent
d27426fd8f
commit
b0b2657fe0
@ -7,7 +7,7 @@ import multipart from '@fastify/multipart';
|
|||||||
import path, { join } from 'path';
|
import path, { join } from 'path';
|
||||||
import autoLoad from '@fastify/autoload';
|
import autoLoad from '@fastify/autoload';
|
||||||
import { asyncExecShell, createRemoteEngineConfiguration, getDomain, isDev, listSettings, prisma, version } from './lib/common';
|
import { asyncExecShell, createRemoteEngineConfiguration, getDomain, isDev, listSettings, prisma, version } from './lib/common';
|
||||||
import { scheduler } from './lib/scheduler';
|
// import { scheduler } from './lib/scheduler';
|
||||||
import { compareVersions } from 'compare-versions';
|
import { compareVersions } from 'compare-versions';
|
||||||
import Graceful from '@ladjs/graceful'
|
import Graceful from '@ladjs/graceful'
|
||||||
import { verifyRemoteDockerEngineFn } from './routes/api/v1/destinations/handlers';
|
import { verifyRemoteDockerEngineFn } from './routes/api/v1/destinations/handlers';
|
||||||
@ -124,43 +124,43 @@ const host = '0.0.0.0';
|
|||||||
console.log(`Coolify's API is listening on ${host}:${port}`);
|
console.log(`Coolify's API is listening on ${host}:${port}`);
|
||||||
await initServer();
|
await initServer();
|
||||||
|
|
||||||
const graceful = new Graceful({ brees: [scheduler] });
|
// const graceful = new Graceful({ brees: [scheduler] });
|
||||||
graceful.listen();
|
// graceful.listen();
|
||||||
|
|
||||||
setInterval(async () => {
|
// setInterval(async () => {
|
||||||
if (!scheduler.workers.has('deployApplication')) {
|
// if (!scheduler.workers.has('deployApplication')) {
|
||||||
scheduler.run('deployApplication');
|
// scheduler.run('deployApplication');
|
||||||
}
|
// }
|
||||||
if (!scheduler.workers.has('infrastructure')) {
|
// if (!scheduler.workers.has('infrastructure')) {
|
||||||
scheduler.run('infrastructure');
|
// scheduler.run('infrastructure');
|
||||||
}
|
// }
|
||||||
}, 2000)
|
// }, 2000)
|
||||||
|
|
||||||
// autoUpdater
|
// // autoUpdater
|
||||||
setInterval(async () => {
|
// setInterval(async () => {
|
||||||
scheduler.workers.has('infrastructure') && scheduler.workers.get('infrastructure').postMessage("action:autoUpdater")
|
// scheduler.workers.has('infrastructure') && scheduler.workers.get('infrastructure').postMessage("action:autoUpdater")
|
||||||
}, 60000 * 15)
|
// }, 60000 * 15)
|
||||||
|
|
||||||
// cleanupStorage
|
// // cleanupStorage
|
||||||
setInterval(async () => {
|
// setInterval(async () => {
|
||||||
scheduler.workers.has('infrastructure') && scheduler.workers.get('infrastructure').postMessage("action:cleanupStorage")
|
// scheduler.workers.has('infrastructure') && scheduler.workers.get('infrastructure').postMessage("action:cleanupStorage")
|
||||||
}, 60000 * 10)
|
// }, 60000 * 10)
|
||||||
|
|
||||||
// checkProxies and checkFluentBit
|
// // checkProxies and checkFluentBit
|
||||||
setInterval(async () => {
|
// setInterval(async () => {
|
||||||
scheduler.workers.has('infrastructure') && scheduler.workers.get('infrastructure').postMessage("action:checkProxies")
|
// scheduler.workers.has('infrastructure') && scheduler.workers.get('infrastructure').postMessage("action:checkProxies")
|
||||||
scheduler.workers.has('infrastructure') && scheduler.workers.get('infrastructure').postMessage("action:checkFluentBit")
|
// scheduler.workers.has('infrastructure') && scheduler.workers.get('infrastructure').postMessage("action:checkFluentBit")
|
||||||
}, 10000)
|
// }, 10000)
|
||||||
|
|
||||||
setInterval(async () => {
|
// setInterval(async () => {
|
||||||
scheduler.workers.has('infrastructure') && scheduler.workers.get('infrastructure').postMessage("action:copySSLCertificates")
|
// scheduler.workers.has('infrastructure') && scheduler.workers.get('infrastructure').postMessage("action:copySSLCertificates")
|
||||||
}, 2000)
|
// }, 2000)
|
||||||
|
|
||||||
await Promise.all([
|
// await Promise.all([
|
||||||
getArch(),
|
// getArch(),
|
||||||
getIPAddress(),
|
// getIPAddress(),
|
||||||
configureRemoteDockers(),
|
// configureRemoteDockers(),
|
||||||
])
|
// ])
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
@ -18,10 +18,10 @@ const options: any = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
jobs: [
|
// jobs: [
|
||||||
{ name: 'infrastructure' },
|
// { name: 'infrastructure' },
|
||||||
{ name: 'deployApplication' },
|
// { name: 'deployApplication' },
|
||||||
],
|
// ],
|
||||||
};
|
};
|
||||||
if (isDev) options.root = path.join(__dirname, '../jobs');
|
if (isDev) options.root = path.join(__dirname, '../jobs');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user