This commit is contained in:
MeiMei 2019-12-15 03:35:09 +09:00 committed by syuilo
parent 66165b1935
commit 648be3005f
2 changed files with 3 additions and 2 deletions

View File

@ -26,7 +26,7 @@ module.exports = (server: http.Server) => {
const subscriber = redis.createClient(
config.redis.port, config.redis.host);
subscriber.subscribe('misskey');
subscriber.subscribe(config.host);
ev = new EventEmitter();

View File

@ -4,6 +4,7 @@ import { Note } from '../models/entities/note';
import { UserList } from '../models/entities/user-list';
import { ReversiGame } from '../models/entities/games/reversi/game';
import { UserGroup } from '../models/entities/user-group';
import config from '../config';
class Publisher {
private publish = (channel: string, type: string | null, value?: any): void => {
@ -11,7 +12,7 @@ class Publisher {
{ type: type, body: null } :
{ type: type, body: value };
redis.publish('misskey', JSON.stringify({
redis.publish(config.host, JSON.stringify({
channel: channel,
message: message
}));