aboutsummaryrefslogtreecommitdiff
path: root/scripts/performance
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-06-22 16:31:18 +0300
committerzsloan2023-06-22 10:18:31 -0500
commit971d29e82391cc269405f59b5aad5f31061b633d (patch)
treebfcb63ab18aebfa1aa13c3f7319ce28e734fceb6 /scripts/performance
parent18e2c59a2eb9b1bf952bec6ddfec0cd1abc7cc89 (diff)
downloadgenenetwork2-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.py3
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
""",