1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-11 21:29:13 +09:00
misskey/packages/backend/check_connect.js

16 lines
350 B
JavaScript
Raw Normal View History

/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
2023-04-14 14:14:00 +09:00
import Redis from 'ioredis';
import { loadConfig } from './built/config.js';
const config = loadConfig();
const redis = new Redis(config.redis);
redis.on('connect', () => redis.disconnect());
redis.on('error', (e) => {
throw e;
});