后台:修复维护问题

This commit is contained in:
luying
2022-01-14 17:11:56 +08:00
parent 211ee39645
commit fce004c079
3 changed files with 67 additions and 4 deletions

View File

@@ -444,8 +444,8 @@ async function setMaintenance(batchCode: string) {
let now = nowSeconds();
// 发送消息
if(maintenance.hasNotify && now < maintenance.startTime) {
if(now > maintenance.startTime - 5 * 60) {
if(maintenance.hasNotify && now < maintenance.startTime) { // 提前5分钟发通知
if(now > maintenance.startTime - 5 * 60) {
maintenanceNotifySchedule(batchCode);
} else {
if(scheduledJobs[`maintenNotify${batchCode}`]) scheduledJobs[`maintenNotify${batchCode}`].cancel();