Fixed mysql caching.

This commit is contained in:
Michael Herzberg 2017-10-07 21:01:14 +01:00
parent 2abc386f48
commit 615b8f46a3
1 changed files with 3 additions and 4 deletions

View File

@ -28,15 +28,14 @@ from ExtensionCrawler.util import log_info, log_error, log_exception
class MysqlBackend:
cache = {}
db = None
cursor = None
def __init__(self, ext_id, try_wait=config.const_mysql_try_wait(), maxtries=config.const_mysql_maxtries(), **kwargs):
self.ext_id = ext_id
self.dbargs = kwargs
self.try_wait = try_wait
self.maxtries = maxtries
self.cache = {}
self.db = None
self.cursor = None
def __enter__(self):
self._create_conn()