Don't start prometheus service if disabled
This commit is contained in:
parent
ac871cb453
commit
7c1cbbc54b
1 changed files with 7 additions and 4 deletions
11
app.js
11
app.js
|
@ -63,6 +63,12 @@ esmBot ${esmBotVersion} (${(await exec("git rev-parse HEAD").then(output => outp
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const services = [
|
||||||
|
{ name: "image", ServiceWorker: ImageWorker }
|
||||||
|
];
|
||||||
|
|
||||||
|
if (process.env.METRICS && process.env.METRICS !== "") services.push({ name: "prometheus", ServiceWorker: PrometheusWorker });
|
||||||
|
|
||||||
const Admiral = new Fleet({
|
const Admiral = new Fleet({
|
||||||
BotWorker: Shard,
|
BotWorker: Shard,
|
||||||
token: `Bot ${process.env.TOKEN}`,
|
token: `Bot ${process.env.TOKEN}`,
|
||||||
|
@ -98,10 +104,7 @@ const Admiral = new Fleet({
|
||||||
connectionTimeout: 30000
|
connectionTimeout: 30000
|
||||||
},
|
},
|
||||||
useCentralRequestHandler: process.env.DEBUG_LOG ? false : true, // workaround for eris-fleet weirdness
|
useCentralRequestHandler: process.env.DEBUG_LOG ? false : true, // workaround for eris-fleet weirdness
|
||||||
services: [
|
services
|
||||||
{ name: "prometheus", ServiceWorker: PrometheusWorker },
|
|
||||||
{ name: "image", ServiceWorker: ImageWorker }
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isMaster) {
|
if (isMaster) {
|
||||||
|
|
Loading…
Reference in a new issue