服务器:修复白名单bug
This commit is contained in:
@@ -437,13 +437,17 @@ export async function initMaintenance(servers?: ServerlistType[]) {
|
||||
// 设置维护
|
||||
async function setMaintenance(batchCode: string) {
|
||||
let { maintenance } = maintenInfos.get(batchCode);
|
||||
|
||||
console.log('***** maintenance', maintenance);
|
||||
|
||||
let now = nowSeconds();
|
||||
// 发送消息
|
||||
if(maintenance.hasNotify && now < maintenance.startTime) {
|
||||
if(now > maintenance.startTime - 5 * 60) {
|
||||
maintenanceNotifySchedule(batchCode);
|
||||
} else {
|
||||
scheduleJob(`maintenNotify${batchCode}`, maintenance.startTime - 5 * 60, () => {
|
||||
scheduleJob(`maintenNotify${batchCode}`, (maintenance.startTime - 5 * 60) * 1000, () => {
|
||||
console.log('******* 通知')
|
||||
maintenanceNotifySchedule(batchCode);
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user