mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-10-10 15:42:16 +00:00
refactor: move func methods to the Alas class
This commit is contained in:
@@ -5,6 +5,7 @@ import threading
|
||||
from multiprocessing import Process
|
||||
from typing import Dict, List, Union
|
||||
|
||||
import inflection
|
||||
from filelock import FileLock
|
||||
from rich.console import Console, ConsoleRenderable
|
||||
|
||||
@@ -12,6 +13,7 @@ from module.config.utils import filepath_config
|
||||
from module.logger import logger, set_file_logger, set_func_logger
|
||||
from module.webui.fake import get_config_mod, mod_instance
|
||||
from module.webui.setting import State
|
||||
from module.webui.submodule.utils import get_available_func
|
||||
|
||||
|
||||
class ProcessManager:
|
||||
@@ -148,10 +150,10 @@ class ProcessManager:
|
||||
if e is not None:
|
||||
AzurLaneAutoScript.stop_event = e
|
||||
ArisuAutoSweeper(config_name=config_name).loop()
|
||||
elif func == "Momotalk":
|
||||
from tasks.momotalk.momotalk import MomoTalk
|
||||
elif func in get_available_func():
|
||||
from aas import ArisuAutoSweeper
|
||||
|
||||
MomoTalk(config=config_name, task="Momotalk").run()
|
||||
ArisuAutoSweeper(config_name=config_name).run(inflection.underscore(func))
|
||||
else:
|
||||
logger.critical(f"No function matched: {func}")
|
||||
logger.info(f"[{config_name}] exited. Reason: Finish\n")
|
||||
|
||||
Reference in New Issue
Block a user