1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 02:48:23 +08:00

Opt: Show commit info in updater

This commit is contained in:
18870
2022-01-12 22:27:56 +08:00
parent bff8296af5
commit c8a95970d5
13 changed files with 171 additions and 58 deletions

View File

@@ -17,7 +17,7 @@ from module.logger import logger
class AzurLaneAutoScript:
stop_event: threading.Event
stop_event: threading.Event = None
def __init__(self, config_name='alas'):
self.config_name = config_name
@@ -284,7 +284,7 @@ class AzurLaneAutoScript:
if seconds <= 0:
logger.warning(f'Wait until {str(future)}, but sleep length < 0, skip waiting')
if hasattr(self, 'stop_event'):
if self.stop_event is not None:
self.stop_event.wait(seconds)
if self.stop_event.is_set():
logger.info("Update event detected")
@@ -330,7 +330,7 @@ class AzurLaneAutoScript:
failure_record = {}
while 1:
if hasattr(self, 'stop_event'):
if self.stop_event is not None:
if self.stop_event.is_set():
logger.info("Update event detected")
logger.info(f"Alas [{self.config_name}] exited.")