Skip to content

Commit

Permalink
#29 update backend redis subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Werfling committed Apr 15, 2024
1 parent b016dcc commit bf746d5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions backend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as fs from 'fs';
import {
Args,
DBHelper, DBEntitiesLoader,
Logger, PluginManager, RedisClient
Logger, PluginManager, RedisClient, RedisSubscribe
} from 'flyingfish_core';
import {EntitySchema, MixedList} from 'typeorm';
import {Vts} from 'vts';
Expand Down Expand Up @@ -145,13 +145,16 @@ import exitHook from 'async-exit-hook';

if (tConfig.db.redis && tConfig.db.redis.url) {
try {
const redisClient = RedisClient.getInstance({
const redisSubscribe = RedisSubscribe.getInstance({
url: tConfig.db.redis.url,
password: tConfig.db.redis.password
});
}, true);

const redisClient = RedisClient.getInstance();
await redisClient.connect();
await redisClient.registerChannels([

await redisSubscribe.connect();
await redisSubscribe.registerChannels([
new HimHIP()
]);
} catch (error) {
Expand Down

0 comments on commit bf746d5

Please sign in to comment.