mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-09 06:07:40 +08:00
Fix: Daily app restart
This commit is contained in:
parent
495242cbc2
commit
672f5b4608
7
alas.py
7
alas.py
@ -160,13 +160,20 @@ class AzurLaneAutoScript:
|
|||||||
mode=self.config.Campaign_Mode)
|
mode=self.config.Campaign_Mode)
|
||||||
|
|
||||||
def loop(self):
|
def loop(self):
|
||||||
|
is_first = True
|
||||||
while 1:
|
while 1:
|
||||||
|
if is_first and self.config.task == 'Restart':
|
||||||
|
logger.info('Skip task `Restart` at scheduler start')
|
||||||
|
self.config.task_delay(server_update=True)
|
||||||
|
del self.__dict__['config']
|
||||||
|
|
||||||
logger.info(f'Scheduler: Start task `{self.config.task}`')
|
logger.info(f'Scheduler: Start task `{self.config.task}`')
|
||||||
logger.hr(self.config.task, level=0)
|
logger.hr(self.config.task, level=0)
|
||||||
success = self.run(inflection.underscore(self.config.task))
|
success = self.run(inflection.underscore(self.config.task))
|
||||||
|
|
||||||
logger.info(f'Scheduler: End task `{self.config.task}`')
|
logger.info(f'Scheduler: End task `{self.config.task}`')
|
||||||
del self.__dict__['config']
|
del self.__dict__['config']
|
||||||
|
is_first = False
|
||||||
|
|
||||||
if success:
|
if success:
|
||||||
continue
|
continue
|
||||||
|
@ -102,7 +102,7 @@ class LoginHandler(Combat):
|
|||||||
self.device.app_start()
|
self.device.app_start()
|
||||||
self.handle_app_login()
|
self.handle_app_login()
|
||||||
self.ensure_no_unfinished_campaign()
|
self.ensure_no_unfinished_campaign()
|
||||||
self.config.Scheduler_Enable = False
|
self.config.task_delay(server_update=True)
|
||||||
|
|
||||||
def ensure_no_unfinished_campaign(self, confirm_wait=3):
|
def ensure_no_unfinished_campaign(self, confirm_wait=3):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user