From 01fa1a9f2a429d6e8a4c506909634f5546fdd302 Mon Sep 17 00:00:00 2001 From: Rory& Date: Tue, 16 Dec 2025 09:23:39 +0100 Subject: [PATCH] Forgot to make rabbitmq static --- src/util/util/RabbitMQ.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/util/RabbitMQ.ts b/src/util/util/RabbitMQ.ts index 66384d24b..c7830de1f 100644 --- a/src/util/util/RabbitMQ.ts +++ b/src/util/util/RabbitMQ.ts @@ -20,10 +20,10 @@ import amqp, { Channel, ChannelModel } from "amqplib"; import { Config } from "./Config"; export class RabbitMQ { - public connection: ChannelModel | null = null; - public channel: Channel | null = null; + public static connection: ChannelModel | null = null; + public static channel: Channel | null = null; - async init() { + static async init() { const host = Config.get().rabbitmq.host; if (!host) return; console.log(`[RabbitMQ] connect: ${host}`); @@ -46,7 +46,7 @@ export class RabbitMQ { await this.getSafeChannel(); // why is this here? } - async getSafeChannel(): Promise { + static async getSafeChannel(): Promise { if (!this.connection) return Promise.reject(); if (this.channel) return this.channel;