diff --git a/alas.py b/alas.py index 8dcaf80e0..28011e761 100644 --- a/alas.py +++ b/alas.py @@ -160,13 +160,20 @@ class AzurLaneAutoScript: mode=self.config.Campaign_Mode) def loop(self): + is_first = True 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.hr(self.config.task, level=0) success = self.run(inflection.underscore(self.config.task)) logger.info(f'Scheduler: End task `{self.config.task}`') del self.__dict__['config'] + is_first = False if success: continue diff --git a/module/handler/login.py b/module/handler/login.py index d3d849921..54c38ba22 100644 --- a/module/handler/login.py +++ b/module/handler/login.py @@ -102,7 +102,7 @@ class LoginHandler(Combat): self.device.app_start() self.handle_app_login() 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): """