fixes
This commit is contained in:
parent
e5e262fd4f
commit
da0287ae6e
@ -8,10 +8,12 @@ config_path = None
|
|||||||
|
|
||||||
def initPool(instancePath):
|
def initPool(instancePath):
|
||||||
try:
|
try:
|
||||||
|
global config_path
|
||||||
if(config_path == None):
|
if(config_path == None):
|
||||||
config_path = os.path.join(instancePath,'../../../../secure/connection_data_test.json');
|
config_path = os.path.join(instancePath,'../../../../secure/connection_data_test.json');
|
||||||
|
|
||||||
print (instancePath)
|
print (config_path)
|
||||||
|
|
||||||
if not os.path.exists(config_path):
|
if not os.path.exists(config_path):
|
||||||
print ('cannot find ' + config_path)
|
print ('cannot find ' + config_path)
|
||||||
exit(1)
|
exit(1)
|
||||||
@ -32,6 +34,7 @@ def initPool(instancePath):
|
|||||||
print(e)
|
print(e)
|
||||||
|
|
||||||
def getPoolConnection():
|
def getPoolConnection():
|
||||||
|
global config_path
|
||||||
f = open(config_path);
|
f = open(config_path);
|
||||||
connection_data = json.load(f)
|
connection_data = json.load(f)
|
||||||
return mysql.connector.connect(**connection_data)
|
return mysql.connector.connect(**connection_data)
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
sys.path.insert(0, '/var/www/brecal_test/server')
|
sys.path.insert(0, '/var/www/brecal_test/src/server')
|
||||||
sys.path.insert(0, '/var/www/venv/lib/python3.10/site-packages/')
|
sys.path.insert(0, '/var/www/venv/lib/python3.10/site-packages/')
|
||||||
|
|
||||||
# Set up logging
|
# Set up logging
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user