2023-07-26 22:31:52 -07:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2023-04-13 22:14:00 -07:00
|
|
|
import Redis from 'ioredis';
|
2023-02-26 03:07:45 -08:00
|
|
|
import { loadConfig } from './built/config.js';
|
2023-02-23 21:09:17 -08:00
|
|
|
|
|
|
|
const config = loadConfig();
|
2023-07-20 03:50:31 -07:00
|
|
|
const redis = new Redis(config.redis);
|
2023-02-23 21:09:17 -08:00
|
|
|
|
|
|
|
redis.on('connect', () => redis.disconnect());
|
|
|
|
redis.on('error', (e) => {
|
2023-02-26 03:07:52 -08:00
|
|
|
throw e;
|
2023-02-23 21:09:17 -08:00
|
|
|
});
|