Only use Healthz from index.ts

Not really sure how useful it is anyways?
This commit is contained in:
gnuxie 2022-07-26 15:46:05 +01:00
parent 4d7b7e1b20
commit c8489a9fd9
3 changed files with 2 additions and 2 deletions

View File

@ -360,7 +360,6 @@ export class Mjolnir {
}
this.currentState = STATE_RUNNING;
Healthz.isHealthy = true;
await this.logMessage(LogLevel.INFO, "Mjolnir@startup", "Startup complete. Now monitoring rooms.");
} catch (err) {
try {

View File

@ -16,7 +16,7 @@ limitations under the License.
import * as http from "http";
import { LogService } from "matrix-bot-sdk";
// allowed to use the global configuration since there should only be one of these anyways.
// allowed to use the global configuration since this is only intended to be used by `src/index.ts`.
import config from '../config';
export class Healthz {

View File

@ -63,6 +63,7 @@ if (config.health.healthz.enabled) {
}
try {
await bot.start();
Healthz.isHealthy = true;
} catch (err) {
console.error(`Mjolnir failed to start: ${err}`);
throw err;