1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-09 18:39:04 +08:00
AzurLaneAutoScript/module/webui/setting.py

33 lines
691 B
Python
Raw Normal View History

import multiprocessing
import threading
2022-04-15 03:37:54 +08:00
from multiprocessing.managers import SyncManager
from module.config.config_updater import ConfigUpdater
2022-06-03 21:28:44 +08:00
from module.webui.config import DeployConfig
2022-01-21 03:55:30 +08:00
class State:
"""
Shared settings
"""
_init = False
_clearup = False
2022-06-03 21:28:44 +08:00
deploy_config = DeployConfig()
config_updater = ConfigUpdater()
2022-06-25 20:04:45 +08:00
restart_event: threading.Event = None
manager: SyncManager = None
electron: bool = False
theme: str = "default"
@classmethod
def init(cls):
cls.manager = multiprocessing.Manager()
cls._init = True
@classmethod
def clearup(cls):
cls.manager.shutdown()
cls._clearup = True