mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-23 06:47:37 +08:00
🐛 fix 通道类回调函数在进程间传递时无法序列号的问题
This commit is contained in:
parent
6c39ed8ab5
commit
0d16d53cb7
@ -5,11 +5,11 @@ import sys
|
|||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
from watchdog.observers import Observer
|
|
||||||
from watchdog.events import FileSystemEventHandler
|
from watchdog.events import FileSystemEventHandler
|
||||||
|
from watchdog.observers import Observer
|
||||||
|
|
||||||
from liteyuki.bot.lifespan import (LIFESPAN_FUNC, Lifespan)
|
from liteyuki.bot.lifespan import (LIFESPAN_FUNC, Lifespan)
|
||||||
from liteyuki.comm.channel import Channel, set_channel
|
|
||||||
from liteyuki.core import IS_MAIN_PROCESS
|
from liteyuki.core import IS_MAIN_PROCESS
|
||||||
from liteyuki.core.manager import ProcessManager
|
from liteyuki.core.manager import ProcessManager
|
||||||
from liteyuki.core.spawn_process import mb_run, nb_run
|
from liteyuki.core.spawn_process import mb_run, nb_run
|
||||||
@ -68,8 +68,6 @@ $$$$$$$$/ $$$$$$/ $$/ $$$$$$$$/ $$/ $$$$$$/ $$/ $$/ $$$$$$/
|
|||||||
def start_watcher(self):
|
def start_watcher(self):
|
||||||
if self.config.get("debug", False):
|
if self.config.get("debug", False):
|
||||||
|
|
||||||
code_directories = {}
|
|
||||||
|
|
||||||
src_directories = (
|
src_directories = (
|
||||||
"liteyuki",
|
"liteyuki",
|
||||||
"src/liteyuki_main",
|
"src/liteyuki_main",
|
||||||
|
@ -13,7 +13,6 @@ import requests
|
|||||||
|
|
||||||
from src.utils.base.config import load_from_yaml, config
|
from src.utils.base.config import load_from_yaml, config
|
||||||
from src.utils.base.log import init_log
|
from src.utils.base.log import init_log
|
||||||
from src.utils.base.data_manager import TempConfig, common_db
|
|
||||||
from git import Repo
|
from git import Repo
|
||||||
|
|
||||||
|
|
||||||
@ -64,9 +63,9 @@ def init():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
nonebot.logger.error(f"Failed to load git repository: {e}, please clone this project from GitHub instead of downloading the zip file.")
|
nonebot.logger.error(f"Failed to load git repository: {e}, please clone this project from GitHub instead of downloading the zip file.")
|
||||||
|
|
||||||
temp_data: TempConfig = common_db.where_one(TempConfig(), default=TempConfig())
|
# temp_data: TempConfig = common_db.where_one(TempConfig(), default=TempConfig())
|
||||||
temp_data.data["start_time"] = time.time()
|
# temp_data.data["start_time"] = time.time()
|
||||||
common_db.save(temp_data)
|
# common_db.save(temp_data)
|
||||||
|
|
||||||
# 在加载完成语言后再初始化日志
|
# 在加载完成语言后再初始化日志
|
||||||
nonebot.logger.info("Liteyuki is initializing...")
|
nonebot.logger.info("Liteyuki is initializing...")
|
||||||
|
@ -5,7 +5,6 @@ from pydantic import Field
|
|||||||
from .data import Database, LiteModel, Database
|
from .data import Database, LiteModel, Database
|
||||||
|
|
||||||
DATA_PATH = "data/liteyuki"
|
DATA_PATH = "data/liteyuki"
|
||||||
|
|
||||||
user_db: Database = Database(os.path.join(DATA_PATH, "users.ldb"))
|
user_db: Database = Database(os.path.join(DATA_PATH, "users.ldb"))
|
||||||
group_db: Database = Database(os.path.join(DATA_PATH, "groups.ldb"))
|
group_db: Database = Database(os.path.join(DATA_PATH, "groups.ldb"))
|
||||||
plugin_db: Database = Database(os.path.join(DATA_PATH, "plugins.ldb"))
|
plugin_db: Database = Database(os.path.join(DATA_PATH, "plugins.ldb"))
|
||||||
|
Loading…
Reference in New Issue
Block a user