diff options
| -rw-r--r-- | bitbake/lib/prserv/db.py | 4 | ||||
| -rw-r--r-- | bitbake/lib/prserv/serv.py | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/prserv/db.py b/bitbake/lib/prserv/db.py index 559935544a..86eafe338c 100644 --- a/bitbake/lib/prserv/db.py +++ b/bitbake/lib/prserv/db.py | |||
| @@ -43,6 +43,10 @@ class PRTable(object): | |||
| 43 | continue | 43 | continue |
| 44 | raise exc | 44 | raise exc |
| 45 | 45 | ||
| 46 | def sync(self): | ||
| 47 | self.conn.commit() | ||
| 48 | self._execute("BEGIN EXCLUSIVE TRANSACTION") | ||
| 49 | |||
| 46 | def _getValueHist(self, version, pkgarch, checksum): | 50 | def _getValueHist(self, version, pkgarch, checksum): |
| 47 | data=self._execute("SELECT value FROM %s WHERE version=? AND pkgarch=? AND checksum=?;" % self.table, | 51 | data=self._execute("SELECT value FROM %s WHERE version=? AND pkgarch=? AND checksum=?;" % self.table, |
| 48 | (version, pkgarch, checksum)) | 52 | (version, pkgarch, checksum)) |
diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py index a9c7ed104c..7864594bb6 100644 --- a/bitbake/lib/prserv/serv.py +++ b/bitbake/lib/prserv/serv.py | |||
| @@ -74,7 +74,7 @@ class PRServer(SimpleXMLRPCServer): | |||
| 74 | except: | 74 | except: |
| 75 | self.handle_error(request, client_address) | 75 | self.handle_error(request, client_address) |
| 76 | self.shutdown_request(request) | 76 | self.shutdown_request(request) |
| 77 | 77 | self.table.sync() | |
| 78 | 78 | ||
| 79 | def process_request(self, request, client_address): | 79 | def process_request(self, request, client_address): |
| 80 | self.requestqueue.put((request, client_address)) | 80 | self.requestqueue.put((request, client_address)) |
| @@ -120,6 +120,7 @@ class PRServer(SimpleXMLRPCServer): | |||
| 120 | while not self.quit: | 120 | while not self.quit: |
| 121 | self.handle_request() | 121 | self.handle_request() |
| 122 | 122 | ||
| 123 | self.table.sync() | ||
| 123 | logger.info("PRServer: stopping...") | 124 | logger.info("PRServer: stopping...") |
| 124 | self.server_close() | 125 | self.server_close() |
| 125 | return | 126 | return |
