Merge remote-tracking branch 'origin/bugfix' into bugfix

This commit is contained in:
dy 2023-12-18 15:50:50 +08:00
commit a5ad7ee2cf
3 changed files with 8 additions and 7 deletions

View File

@ -172,7 +172,7 @@ export class EmailFun {
sendEmail.sid = uid.split('_')[0]
}
if (prize.length > 0) {
if (prize?.length > 0) {
sendEmail.prizeData = {
prize: email.prize,
isGet: false

View File

@ -18,9 +18,11 @@ export async function clearGud(uid) {
G.ioredis.del(`gudVersion:${uid}_pid`);
G.ioredis.del(`gudVersion:${uid}_ver`);
}
G.redis.del("equip",uid);
G.redis.del("hero",uid);
G.redis.del("shiwu",uid);
if(await G.redis.type('tanxian', uid)){
console.log('清空tanxian Redis',uid);
G.redis.del("tanxian",uid);
}
};
/**

View File

@ -60,10 +60,9 @@ export async function initRedis() {
//启动前清理redis残余数据
clusterRunOnce(async () => {
await clearRedis();
await setRedis();
})
if (G.config.cleanRedis) await redisClient.flushDb();
await setRedis();
console.log('connect redis succ');
}
@ -77,7 +76,7 @@ async function clearRedis() {
G.redis.fromatKey('item'),
G.redis.fromatKey('hero'),
G.redis.fromatKey('equip'),
//G.redis.fromatKey('shiwu'),
G.redis.fromatKey('shiwu'),
//G.redis.fromatKey('gbtx'),
//G.redis.fromatKey('dxlt'),
])