reset connection settings back to test

This commit is contained in:
Daniel Schick 2025-11-25 11:30:23 +01:00
parent 13f2b98a79
commit f08f84f8b8
3 changed files with 5 additions and 5 deletions

View File

@ -69,7 +69,7 @@ def create_app(test_config=None, instance_path=None):
app.register_blueprint(history.bp) app.register_blueprint(history.bp)
app.register_blueprint(ports.bp) app.register_blueprint(ports.bp)
logging.basicConfig(filename='brecal.log', level=logging.WARNING, format='%(asctime)s | %(name)s | %(levelname)s | %(message)s') logging.basicConfig(filename='brecaltest.log', level=logging.WARNING, format='%(asctime)s | %(name)s | %(levelname)s | %(message)s')
local_db.initPool(os.path.dirname(app.instance_path)) local_db.initPool(os.path.dirname(app.instance_path))
logging.info('App started') logging.info('App started')

View File

@ -23,8 +23,8 @@ def _build_pool_config(connection_data, pool_name, pool_size):
return pool_config return pool_config
def initPool(instancePath, connection_filename="connection_data_prod.json", def initPool(instancePath, connection_filename="connection_data_test.json",
pool_name="brecal_pool", pool_size=10): pool_name="brecal_test_pool", pool_size=10):
""" """
Initialize the MySQL connection pool and load email credentials. Initialize the MySQL connection pool and load email credentials.
""" """
@ -32,7 +32,7 @@ def initPool(instancePath, connection_filename="connection_data_prod.json",
try: try:
if config_path is None: if config_path is None:
config_path = os.path.join(instancePath, f'../../../secure/{connection_filename}') config_path = os.path.join(instancePath, f'../../../secure/{connection_filename}')
# config_path = 'C:\\temp\\connection_data_test.json' # config_path = 'C:\\temp\\connection_data_test.json'
print(config_path) print(config_path)

View File

@ -2,7 +2,7 @@ import os
import sys import sys
import logging import logging
sys.path.insert(0, '/var/www/brecal/src/server') sys.path.insert(0, '/var/www/brecal_test/src/server')
sys.path.insert(0, '/var/www/venv/lib/python3.12/site-packages/') sys.path.insert(0, '/var/www/venv/lib/python3.12/site-packages/')
import schedule import schedule