Skip to content
Snippets Groups Projects
Commit 59494930 authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Add docstring for time_db_transaction

parent fe775397
No related branches found
No related tags found
1 merge request!832[Webservice] Fix database lock timeouts
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment