Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions firefly/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#coding:utf8
# coding:utf8
'''
Created on 2013-10-21

Expand All @@ -7,4 +7,4 @@


from firefly._version import version
__version__ = version.short()
__version__ = version.short()
4 changes: 2 additions & 2 deletions firefly/_version.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#coding:utf8
# coding:utf8
'''
Created on 2013-10-21

@author: lan (www.9miao.com)
'''

from twisted.python import versions
version = versions.Version('firefly', 1, 3, 3)
version = versions.Version('firefly', 1, 3, 3)
16 changes: 9 additions & 7 deletions firefly/dbentrust/dbpool.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#coding:utf8
# coding:utf8
'''
Created on 2013-5-8

Expand All @@ -7,20 +7,22 @@
from DBUtils.PooledDB import PooledDB
import MySQLdb

DBCS = {'mysql':MySQLdb,}
DBCS = {'mysql': MySQLdb, }


class DBPool(object):

'''
'''
def initPool(self,**kw):

def initPool(self, **kw):
'''
'''
self.config = kw
creator = DBCS.get(kw.get('engine','mysql'),MySQLdb)
self.pool = PooledDB(creator,5,**kw)
creator = DBCS.get(kw.get('engine', 'mysql'), MySQLdb)
self.pool = PooledDB(creator, 5, **kw)

def connection(self):
return self.pool.connection()

dbpool = DBPool()

Loading