1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-14 20:09:25 +08:00

fix: delay interval option not working

This commit is contained in:
ZuoSiZhu
2025-06-21 14:32:05 +08:00
parent ab18217fa8
commit bff32b75e7

View File

@@ -119,7 +119,8 @@ class AzurLaneAutoScript:
def DelayAllTask(self):
Current = datetime.now()
TimeDelta = timedelta(minutes=self.config.OthersLogin_Interval, seconds=-1)
interval = deep_get(self.config.data, "OthersLogin.OthersLogin.Interval", 60)
TimeDelta = timedelta(minutes=interval, seconds=-1)
self.config.task_delay(target=Current + TimeDelta, task=self.config.task.command)
@@ -150,10 +151,11 @@ class AzurLaneAutoScript:
if Method == "stay_there":
self.device.click(OTHERS_LOGIN_CONFIRM)
if deep_get(self.config.data, "OthersLogin.OthersLogin.Notify", True):
interval = deep_get(self.config.data, "OthersLogin.OthersLogin.Interval", 60)
handle_notify(
self.config.Error_OnePushConfig,
title=f"Alas <{self.config_name}>: account's owner logs in",
content=f"Delay some tasks to {datetime.now() + timedelta(minutes=self.config.OthersLogin_Interval, seconds=-1)}",
content=f"Delay some tasks to {datetime.now() + timedelta(minutes=interval, seconds=-1)}",
)
self.config.save()
self.config.update()