misskey/packages/backend/check_connect.js

15 lines
346 B
JavaScript

// SPDX-FileCopyrightText: syuilo and other misskey contributors
//
// SPDX-License-Identifier: AGPL-3.0-only
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;
});