from concurrent.futures import Future

from app.application.commands import register_command_class
from app.command import Command

# 导入期即向 application 门面注册命令类，保证工具调用时不依赖静态边。
register_command_class(Command)


def init_command():
    """
    初始化命令
    """
    Command()


def stop_command():
    """
    停止命令
    """
    pass


def restart_command() -> Future:
    """
    重建命令并返回完成信号。
    """
    return Command().init_commands()
