Fixed stats

This commit is contained in:
Essem 2022-11-01 01:41:45 -05:00
parent 21f3047ad4
commit ede7b65b6a
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
2 changed files with 3 additions and 3 deletions

View file

@ -78,7 +78,7 @@ class StatsCommand extends Command {
return new Promise((resolve, reject) => {
pm2.list((err, list) => {
if (err) return reject(err);
resolve(list.filter((v) => v.name === "esmBot"));
resolve(list.filter((v) => v.name.includes("esmBot-proc")));
});
});
}

View file

@ -77,7 +77,7 @@ function updateStats() {
return new Promise((resolve, reject) => {
pm2.list((err, list) => {
if (err) reject(err);
const clusters = list.filter((v) => v.name === "esmBot");
const clusters = list.filter((v) => v.name.includes("esmBot-proc"));
clusterCount = clusters.length;
const listener = (packet) => {
if (packet.data?.type === "serverCounts") {
@ -231,7 +231,7 @@ function calcShards(shards, procs) {
function awaitStart(i, shardArrays) {
return new Promise((resolve) => {
pm2.start({
name: `esmBot-${i}`,
name: `esmBot-proc${i}`,
script: "app.js",
autorestart: true,
exp_backoff_restart_delay: 1000,