docs: rebrand to KatelyaTV and add release notes\n\n- Update QUICKSTART, PROJECT_STATUS, CONTRIBUTING, CHANGELOG\n- Add RELEASE_NOTES.md for v0.1.0-katelya\n- UI text: replace MoonTV mentions where user-facing\n- Config defaults: SITE_NAME -> KatelyaTV\n- Version check: allow env override, keep MoonTV fallback\n- Upstash client: add KatelyaTV global symbol with legacy alias\n- LocalStorage: migrate keys to katelyatv_* with legacy fallback
This commit is contained in:
@@ -271,8 +271,9 @@ export class UpstashRedisStorage implements IStorage {
|
||||
|
||||
// 单例 Upstash Redis 客户端
|
||||
function getUpstashRedisClient(): Redis {
|
||||
const globalKey = Symbol.for('__MOONTV_UPSTASH_REDIS_CLIENT__');
|
||||
let client: Redis | undefined = (global as any)[globalKey];
|
||||
const legacyKey = Symbol.for('__MOONTV_UPSTASH_REDIS_CLIENT__');
|
||||
const globalKey = Symbol.for('__KATELYATV_UPSTASH_REDIS_CLIENT__');
|
||||
let client: Redis | undefined = (global as any)[globalKey] || (global as any)[legacyKey];
|
||||
|
||||
if (!client) {
|
||||
const upstashUrl = process.env.UPSTASH_URL;
|
||||
@@ -299,6 +300,8 @@ function getUpstashRedisClient(): Redis {
|
||||
console.log('Upstash Redis client created successfully');
|
||||
|
||||
(global as any)[globalKey] = client;
|
||||
// 同步设置旧的全局键,保持向后兼容
|
||||
(global as any)[legacyKey] = client;
|
||||
}
|
||||
|
||||
return client;
|
||||
|
||||
Reference in New Issue
Block a user