diff options
author | Frederick Muriuki Muriithi | 2023-06-22 16:31:18 +0300 |
---|---|---|
committer | zsloan | 2023-06-22 10:18:31 -0500 |
commit | 971d29e82391cc269405f59b5aad5f31061b633d (patch) | |
tree | bfcb63ab18aebfa1aa13c3f7319ce28e734fceb6 /scripts/performance | |
parent | 18e2c59a2eb9b1bf952bec6ddfec0cd1abc7cc89 (diff) | |
download | genenetwork2-971d29e82391cc269405f59b5aad5f31061b633d.tar.gz |
Update calls to `database_connection` function
Pass in the database URI at call time.
Diffstat (limited to 'scripts/performance')
-rw-r--r-- | scripts/performance/timeit_gn2.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/performance/timeit_gn2.py b/scripts/performance/timeit_gn2.py index 1c64e22c..a3e1fb20 100644 --- a/scripts/performance/timeit_gn2.py +++ b/scripts/performance/timeit_gn2.py @@ -14,7 +14,7 @@ class UserSessionSimulator(): def dump_sample_data(dataset_name, trait_id): - with database_connection() as conn, conn.cursor() as cursor: + with database_connection(get_setting("SQL_URI")) as conn, conn.cursor() as cursor: sample_data = {"headers": ["Name", "Value", "SE"], "data": []} with app.app_context(): @@ -47,6 +47,7 @@ print(dump_sample_data("HLCPublish", "10001")) from flask import g from wqflask import app +from utility.tools import get_setting from wqflask.database import database_connection from wqflask.show_trait import show_trait """, |