mizzkey/packages/backend/scripts/check_connect.js

16 lines
358 B
JavaScript
Raw Normal View History

/*
2024-07-01 02:33:26 +02:00
* SPDX-FileCopyrightText: syuilo and misskey-project , Type4ny-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
2023-04-14 07:14:00 +02: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;
});