feat: set sqlite pragma by env variable (#3136)
* set sqlite pragma by env variable * configurable * [autofix.ci] apply automated fixes * fix circular dep * [autofix.ci] apply automated fixes --------- Co-authored-by: Nicolò Boschi <boschi1997@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
865fc24293
commit
1dd840c526
3 changed files with 42 additions and 14 deletions
|
|
@ -402,3 +402,13 @@ def test_migrate_transactions_no_duckdb(client: TestClient):
|
|||
migrate_transactions_from_monitor_service_to_database(session)
|
||||
new_trans = get_transactions_by_flow_id(session, UUID(flow_id))
|
||||
assert 0 == len(new_trans)
|
||||
|
||||
|
||||
def test_sqlite_pragmas():
|
||||
db_service = get_db_service()
|
||||
|
||||
with db_service as session:
|
||||
from sqlalchemy import text
|
||||
|
||||
assert "wal" == session.execute(text("PRAGMA journal_mode;")).fetchone()[0]
|
||||
assert 1 == session.execute(text("PRAGMA synchronous;")).fetchone()[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue