From 971d29e82391cc269405f59b5aad5f31061b633d Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 22 Jun 2023 16:31:18 +0300 Subject: Update calls to `database_connection` function Pass in the database URI at call time. --- scripts/performance/timeit_gn2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/performance') 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 """, -- cgit v1.2.3