예제 #1
0
def makeParam():
    paramDic = jTool.getConfigParam(['hostSvr', 'dbHost', 'dbUser', 'dbPasswd', 'rdb', 'basePostUrl', 'preUrl', 'basePostUrlip', 'preUrlip'], 'config.ini')
    conn = jTool.initCursor(paramDic['dbHost'], paramDic['dbUser'], paramDic['dbPasswd'], paramDic['rdb'])
    paramDic['conn'] = conn
    return paramDic
예제 #2
0
 def __init__(self):
     paramDic = jTool.getConfigParam(['host', 'user', 'passwd', 'db'], 'server.ini')
     conn = jTool.initCursor(paramDic['host'], paramDic['user'], paramDic['passwd'], paramDic['db'])
     self.conn = conn
예제 #3
0
# -*-coding: utf-8 -*-
#encoding=utf-8

import sys
import jTool

reload(sys)
sys.setdefaultencoding("utf-8")

#初始化任务表用,每个任务跑一次就可以

paramDic = jTool.getConfigParam(['host', 'user', 'passwd', 'db', 'initTable'], 'server.ini')
conn = jTool.initCursor(paramDic['host'], paramDic['user'], paramDic['passwd'], paramDic['db'])
jTool.initTaskTable(conn, paramDic['initTable'])
예제 #4
0
def getParam():
    param = jTool.getConfigParam(['lHeader', 'rHeader', 'url'], 'router.ini')
    param['lHeader'] = eval('['+param['lHeader']+']')
    param['rHeader'] = eval('['+param['rHeader']+']')
    return param