Mercurial > libervia-backend
comparison sat/memory/sqlite.py @ 2747:6487b8855c9a
memory (sqlite): minor comment move
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 04 Jan 2019 09:26:57 +0100 |
parents | 1e2f0856c845 |
children | 378188abe941 |
comparison
equal
deleted
inserted
replaced
2746:1e2f0856c845 | 2747:6487b8855c9a |
---|---|
125 # this is specific to this sqlite storage and for now only used for received_timestamp | 125 # this is specific to this sqlite storage and for now only used for received_timestamp |
126 # because this value is stored in a separate field | 126 # because this value is stored in a separate field |
127 | 127 |
128 | 128 |
129 class ConnectionPool(adbapi.ConnectionPool): | 129 class ConnectionPool(adbapi.ConnectionPool): |
130 # Workaround to avoid IntegrityError causing (i)pdb to be launched in debug mode | |
131 def _runQuery(self, trans, *args, **kw): | 130 def _runQuery(self, trans, *args, **kw): |
132 retry = kw.pop('query_retry', 6) | 131 retry = kw.pop('query_retry', 6) |
133 try: | 132 try: |
134 trans.execute(*args, **kw) | 133 trans.execute(*args, **kw) |
135 except sqlite3.IntegrityError as e: | 134 except sqlite3.IntegrityError as e: |
135 # Workaround to avoid IntegrityError causing (i)pdb to be | |
136 # launched in debug mode | |
136 raise failure.Failure(e) | 137 raise failure.Failure(e) |
137 except Exception as e: | 138 except Exception as e: |
138 # FIXME: in case of error, we retry a couple of times | 139 # FIXME: in case of error, we retry a couple of times |
139 # this is a workaround, we need to move to better | 140 # this is a workaround, we need to move to better |
140 # Sqlite integration, probably with high level library | 141 # Sqlite integration, probably with high level library |