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