mirror of
https://github.com/sui-feng-cb/AzurLaneAutoScript1.git
synced 2026-07-22 14:01:52 +08:00
Refactor: replace independent scheduled DowntimeFetch task with on-demand auto-fetch
This commit is contained in:
@@ -9,7 +9,7 @@ from module.combat.combat import Combat
|
||||
from module.daily.assets import *
|
||||
from module.logger import logger
|
||||
from module.ocr.ocr import Digit
|
||||
from module.smart_mgmt.utils import parse_downtime
|
||||
from module.smart_mgmt.downtime_fetch import get_downtime_end
|
||||
from module.ui.assets import BACK_ARROW, DAILY_CHECK
|
||||
from module.ui.page import page_campaign_menu, page_daily
|
||||
|
||||
@@ -347,14 +347,7 @@ class Daily(Combat):
|
||||
maintenance has not ended yet, or None if smart_mgmt unavailable,
|
||||
today is not maintenance day, or maintenance already ended.
|
||||
"""
|
||||
if self.config.SERVER != 'cn':
|
||||
return None
|
||||
if not self.config.cross_get('DowntimeMgmt.DowntimeStrategy.ManageDaily', False):
|
||||
return None
|
||||
window = self.config.cross_get('DowntimeMgmt.Downtime.Window', None)
|
||||
if not window:
|
||||
return None
|
||||
end_dt = parse_downtime(window)
|
||||
end_dt = get_downtime_end(self.config)
|
||||
if end_dt is None:
|
||||
return None
|
||||
now = datetime.now()
|
||||
|
||||
Reference in New Issue
Block a user