1 files changed, 10 insertions, 11 deletions
diff --git a/src/util/util/RabbitMQ.ts b/src/util/util/RabbitMQ.ts
index 1bfb3f5c..f59f6fe3 100644
--- a/src/util/util/RabbitMQ.ts
+++ b/src/util/util/RabbitMQ.ts
@@ -1,5 +1,5 @@
import amqp, { Connection, Channel } from "amqplib";
-// import Config from "./Config";
+import { Config } from "./Config";
export const RabbitMQ: {
connection: Connection | null;
@@ -9,15 +9,14 @@ export const RabbitMQ: {
connection: null,
channel: null,
init: async function () {
- return;
- // const host = Config.get().rabbitmq.host;
- // if (!host) return;
- // console.log(`[RabbitMQ] connect: ${host}`);
- // this.connection = await amqp.connect(host, {
- // timeout: 1000 * 60,
- // });
- // console.log(`[RabbitMQ] connected`);
- // this.channel = await this.connection.createChannel();
- // console.log(`[RabbitMQ] channel created`);
+ const host = Config.get().rabbitmq.host;
+ if (!host) return;
+ console.log(`[RabbitMQ] connect: ${host}`);
+ this.connection = await amqp.connect(host, {
+ timeout: 1000 * 60,
+ });
+ console.log(`[RabbitMQ] connected`);
+ this.channel = await this.connection.createChannel();
+ console.log(`[RabbitMQ] channel created`);
},
};
|