防沉迷:定时任务

This commit is contained in:
luying
2021-03-04 20:36:59 +08:00
parent 32bb6cb2e3
commit 8a122b6a4d
11 changed files with 141 additions and 32 deletions

View File

@@ -9,7 +9,7 @@ interface UserCache {
var userCacheMap = new Map<string, UserCache>();
export function init() {
scheduleJob("0/5 * * * * *", clearDirtyData, {name:'clearDirtyData'});//每个5秒钟释放redis锁
scheduleJob('clearDirtyData', "0/5 * * * * *", clearDirtyData);//每个5秒钟释放redis锁
}
/**
* 释放锁