(self, reason="Unknown")
| 110 | return self.cur.execute(query, params) |
| 111 | |
| 112 | def commit(self, reason="Unknown"): |
| 113 | if self.progress_sleeping: |
| 114 | self.log.debug("Commit ignored: Progress sleeping") |
| 115 | return False |
| 116 | |
| 117 | try: |
| 118 | s = time.time() |
| 119 | self.conn.commit() |
| 120 | self.log.debug("Commited in %.3fs (reason: %s)" % (time.time() - s, reason)) |
| 121 | return True |
| 122 | except Exception as err: |
| 123 | self.log.error("Commit error: %s" % err) |
| 124 | return False |
| 125 | |
| 126 | def insertOrUpdate(self, *args, **kwargs): |
| 127 | if not self.conn: |
no test coverage detected