后台:修复维护问题

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

View File

@@ -442,8 +442,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 {
scheduleJob(`maintenNotify${batchCode}`, (maintenance.startTime - 5 * 60) * 1000, () => {