mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 02:48:23 +08:00
Fix: Sorting tasks in waiting list (#1634)
This commit is contained in:
@@ -194,11 +194,12 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig, ConfigWatcher
|
||||
else:
|
||||
waiting.append(func)
|
||||
|
||||
f = Filter(regex=r"(.*)", attr=["command"])
|
||||
f.load(self.SCHEDULER_PRIORITY)
|
||||
if pending:
|
||||
f = Filter(regex=r"(.*)", attr=["command"])
|
||||
f.load(self.SCHEDULER_PRIORITY)
|
||||
pending = f.apply(pending, func=lambda x: x.enable)
|
||||
pending = f.apply(pending)
|
||||
if waiting:
|
||||
waiting = f.apply(waiting)
|
||||
waiting = sorted(waiting, key=operator.attrgetter("next_run"))
|
||||
if error:
|
||||
pending = error + pending
|
||||
|
||||
Reference in New Issue
Block a user