hxp
2025-05-23 fdebf36f0d9201c6a6949a08cdfeebb718c25ce2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------
#
 
 
import traceback
from Common import (mylog)
from LogicProcess import (UserCtrlDB)
from DBCommon import (error, EnvCheck)
from Collections import (CheckAndUpdateIndex,)
import PyGameData
 
 
DBConfig = __import__('Config.DBConfig')
 
 
def StartDB(): 
    #ÔËÐл·¾³¼ì²â
    EnvCheck.EnvCheck()
    CheckAndUpdateIndex.CheckAndUpdateIndex()
       
    #Ö÷Âß¼­¿ªÊ¼
    try:
        PyGameData.g_usrCtrlDB = UserCtrlDB.UserCtrlDB()
 
    except:
        msg = error.formatMsg('fatal', error.ERROR_NO_17, 'unknown err = %s'%traceback.format_exc())       
        mylog.fatal(msg)
 
#×¢ÒâÖØ¶ÁµÄÓ°Ïì        
def GetUserCtrlDB():
    return PyGameData.g_usrCtrlDB