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:
6
alas.py
6
alas.py
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user