Skip to content
Snippets Groups Projects

[Webservice] Fix database lock timeouts

Merged Thomas Kluyver requested to merge fix/websvc-db-write-locking into master
1 unresolved thread
+ 5
1
@@ -304,6 +304,11 @@ def parse_config(cmd: List[str], config: Dict[str, Any]) -> List[str]:
class time_db_transaction:
"""Record time taken to write to the database
Use as a context manager. When leaving the block, the transaction will be
committed (or rolled back, on error), and the time taken logged.
"""
t_start = 0
def __init__(self, conn: sqlite3.Connection, label: str):
@@ -356,7 +361,6 @@ async def run_action(job_db, cmd, mode, proposal, run, exec_id) -> str:
message = Success.START_CORRECTION.format(proposal, run)
# Save submitted jobs to persistent database.
c = job_db.cursor() # FIXME: asyncio
rstr = stdout.decode()
for r in rstr.split("\n"):
Loading