mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-10-10 22:12:06 +00:00
fix: update func_list handling to ensure proper task binding
This commit is contained in:
@@ -3,8 +3,6 @@ import datetime
|
||||
import operator
|
||||
import threading
|
||||
|
||||
import pywebio
|
||||
|
||||
from module.base.decorator import cached_property, del_cached_property
|
||||
from module.base.filter import Filter
|
||||
from module.config.config_generated import GeneratedConfig
|
||||
@@ -129,13 +127,17 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig, ConfigWatcher
|
||||
"""
|
||||
Args:
|
||||
func (str, Function): Function to run
|
||||
func_list (set): Set of tasks to be bound
|
||||
func_list (list[str]): List of tasks to be bound
|
||||
"""
|
||||
if func_list is None:
|
||||
func_list = ["Alas"]
|
||||
if isinstance(func, Function):
|
||||
func = func.command
|
||||
func_list.append(func)
|
||||
# func_list: ["Alas", <task>, *func_list]
|
||||
if func_list is None:
|
||||
func_list = []
|
||||
if func not in func_list:
|
||||
func_list.insert(0, func)
|
||||
if "Alas" not in func_list:
|
||||
func_list.insert(0, "Alas")
|
||||
logger.info(f"Bind task {func_list}")
|
||||
|
||||
# Bind arguments
|
||||
|
||||
Reference in New Issue
Block a user