mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-21 07:55:36 +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:
|
else:
|
||||||
waiting.append(func)
|
waiting.append(func)
|
||||||
|
|
||||||
|
f = Filter(regex=r"(.*)", attr=["command"])
|
||||||
|
f.load(self.SCHEDULER_PRIORITY)
|
||||||
if pending:
|
if pending:
|
||||||
f = Filter(regex=r"(.*)", attr=["command"])
|
pending = f.apply(pending)
|
||||||
f.load(self.SCHEDULER_PRIORITY)
|
|
||||||
pending = f.apply(pending, func=lambda x: x.enable)
|
|
||||||
if waiting:
|
if waiting:
|
||||||
|
waiting = f.apply(waiting)
|
||||||
waiting = sorted(waiting, key=operator.attrgetter("next_run"))
|
waiting = sorted(waiting, key=operator.attrgetter("next_run"))
|
||||||
if error:
|
if error:
|
||||||
pending = error + pending
|
pending = error + pending
|
||||||
|
|||||||
Reference in New Issue
Block a user