Show More
@@ -27,6 +27,7 b' import os' | |||||
27 | import logging |
|
27 | import logging | |
28 | import datetime |
|
28 | import datetime | |
29 | import traceback |
|
29 | import traceback | |
|
30 | import hashlib | |||
30 | from collections import defaultdict |
|
31 | from collections import defaultdict | |
31 |
|
32 | |||
32 | from sqlalchemy import * |
|
33 | from sqlalchemy import * | |
@@ -43,9 +44,8 b' from rhodecode.lib.utils2 import str2boo' | |||||
43 | safe_unicode |
|
44 | safe_unicode | |
44 | from rhodecode.lib.compat import json |
|
45 | from rhodecode.lib.compat import json | |
45 | from rhodecode.lib.caching_query import FromCache |
|
46 | from rhodecode.lib.caching_query import FromCache | |
|
47 | from rhodecode.model.meta import Base, Session | |||
46 |
|
48 | |||
47 | from rhodecode.model.meta import Base, Session |
|
|||
48 | import hashlib |
|
|||
49 |
|
49 | |||
50 | URL_SEP = '/' |
|
50 | URL_SEP = '/' | |
51 | log = logging.getLogger(__name__) |
|
51 | log = logging.getLogger(__name__) | |
@@ -152,6 +152,7 b' class BaseModel(object):' | |||||
152 | return safe_str(self.__unicode__()) |
|
152 | return safe_str(self.__unicode__()) | |
153 | return '<DB:%s>' % (self.__class__.__name__) |
|
153 | return '<DB:%s>' % (self.__class__.__name__) | |
154 |
|
154 | |||
|
155 | ||||
155 | class RhodeCodeSetting(Base, BaseModel): |
|
156 | class RhodeCodeSetting(Base, BaseModel): | |
156 | __tablename__ = 'rhodecode_settings' |
|
157 | __tablename__ = 'rhodecode_settings' | |
157 | __table_args__ = ( |
|
158 | __table_args__ = ( | |
@@ -1128,7 +1129,7 b' class CacheInvalidation(Base, BaseModel)' | |||||
1128 | try: |
|
1129 | try: | |
1129 | inv_obj = CacheInvalidation(key, org_key) |
|
1130 | inv_obj = CacheInvalidation(key, org_key) | |
1130 | Session.add(inv_obj) |
|
1131 | Session.add(inv_obj) | |
1131 |
|
|
1132 | Session.commit() | |
1132 | except Exception: |
|
1133 | except Exception: | |
1133 | log.error(traceback.format_exc()) |
|
1134 | log.error(traceback.format_exc()) | |
1134 | Session.rollback() |
|
1135 | Session.rollback() |
General Comments 0
You need to be logged in to leave comments.
Login now