zhanling重置问题
This commit is contained in:
xichaoyin 2024-01-06 00:07:27 +08:00
parent ef80c8b984
commit f61b59123b

View File

@ -69,7 +69,7 @@ export default async function (call: ApiCall<ReqSyncBtn, ResSyncBtn>) {
data[key] = {active: false}; data[key] = {active: false};
} else { } else {
let zls = await G.mongodb.collection('scheduler').findOne({type: 'zhanling'}); let zls = await G.mongodb.collection('scheduler').findOne({type: 'zhanling'});
if (!data[key] || data[key].round != zls.round) { if (!data[key] || data[key].round != zls?.round) {
let lastRunTime = zls && zls.lastRunTime? zls.lastRunTime : G.time let lastRunTime = zls && zls.lastRunTime? zls.lastRunTime : G.time
let round = zls && zls.lastRunTime? zls.round : 1 let round = zls && zls.lastRunTime? zls.round : 1
data[key] = {active: true, sTime: lastRunTime, round: round}; data[key] = {active: true, sTime: lastRunTime, round: round};