Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rover/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ def _update_stats(self):
with self._db: # single transaction
self._db.cursor().execute('BEGIN')
self._db.execute('DELETE FROM rover_download_stats', tuple())
self._db.commit()
for source in self._sources.values():
progress = source.stats()
self._db.execute('''INSERT INTO rover_download_stats
Expand Down
1 change: 1 addition & 0 deletions rover/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def _current_command_inside_transaction(self):
else:
self._log.debug('Removing dead process %s/%d' % (candidate, pid))
self._db.execute('DELETE FROM rover_processes WHERE pid = ?', (pid,))
self._db.commit()
except StopIteration:
pass # table is empty
try:
Expand Down
3 changes: 2 additions & 1 deletion rover/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ def init_db(dbpath, log):
"""

log.debug('Connecting to sqlite3 %s' % dbpath)
db = connect(dbpath, timeout=60.0)
# Timeout is in seconds
db = connect(dbpath, timeout=120.0)
# https://www.sqlite.org/foreignkeys.html
db.execute('PRAGMA foreign_keys = ON')
db.execute('PRAGMA case_sensitive_like = ON') # as used by mseedindex
Expand Down