This commit is contained in:
yumoqing 2026-05-21 18:41:55 +08:00
parent 953a10ac58
commit 7982a0fd30

View File

@ -16,6 +16,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'
from appPublic.folderUtils import ProgramPath
from appPublic.jsonConfig import getConfig
from sqlor.dbpools import DBPools
from ahserver.serverenv import ServerEnv
from appPublic.log import MyLogger, debug, exception, info
from accounting.init import load_accounting
from llmage.init import load_llmage
@ -29,6 +30,8 @@ DBPools(config.databases)
from llmage.accounting import (
backend_accounting
)
def get_module_dbname(m):
return 'sage'
def main():
logger = MyLogger('backend_accounting', levelname='info',
@ -46,6 +49,8 @@ def main():
signal.signal(signal.SIGTERM, handle_signal)
signal.signal(signal.SIGINT, handle_signal)
env = ServerEnv()
env.get_module_dbname = get_module_dbname
load_accounting()
try:
loop.run_until_complete(backend_accounting())