Exemple #1
0
    def __del__(self):
        if self.conn:
            SQLite.close(self.conn)

        '''
Exemple #2
0
 def __init__(self):
     self.conn = SQLite.conn()
     self.db = self.conn.cursor()
Exemple #3
0
 def __del__(self):
     if self.conn:
         logger.info(u'销毁conn')
         SQLite.close(self.conn)
Exemple #4
0
            query = QueryBill()
            result = query.queryBill(args)
        elif service == 'applyBillPaymentV2':
            # 缴费
            bill = ApplyBill()
            result = bill.applyBill(args)
        elif service == 'queryOrderStatusV2':
            # 查询状态
            status = QueryStatus()
            result = status.queryStatus(args)
        logger.info(u'出参:%s' %str(result))
        return json.dumps(result, ensure_ascii=False)


def func():
    app = web.application(urls, globals())
    app.run()

def func2():
    check = CheckThread()
    check.run()

if __name__ == '__main__':
    logger.info(u'-----------易生活mock系统启动-----------')
    # 初始化数据
    SQLite.init()
    app1 = threading.Thread(target=func)
    app2 = threading.Thread(target=func2)
    app1.start()
    app2.start()
Exemple #5
0
 def __init__(self):
     logger.info(u'线程启动')
     self.conn = SQLite.conn()
     self.db = self.conn.cursor()
Exemple #6
0
 def __init__(self):
     self.render = web.template.render('templates', base='layout')
     self.conn = SQLite.conn()
     self.db = self.conn.cursor()