Skip to content
Snippets Groups Projects
Commit d35638f2 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-772: only read rabbitmq credentials on production/test

parent 8172038d
No related branches found
No related tags found
1 merge request!8Cobalt2 multithreading fix
......@@ -10,15 +10,19 @@ DEFAULT_BROKER = "scu001.control.lofar" if isProductionEnvironment() else \
DEFAULT_PORT = 5675 if isProductionEnvironment() or isTestEnvironment() else 5672
# import the user and password from RabbitMQ 'db'credentials
try:
from lofar.common.dbcredentials import DBCredentials
_db_creds = DBCredentials().get("RabbitMQ")
DEFAULT_USER = _db_creds.user
DEFAULT_PASSWORD = _db_creds.password
except:
DEFAULT_USER = "guest"
DEFAULT_PASSWORD = "guest"
DEFAULT_USER = "guest"
DEFAULT_PASSWORD = "guest"
if isProductionEnvironment() or isTestEnvironment():
# import the user and password from RabbitMQ 'db'credentials
try:
from lofar.common.dbcredentials import DBCredentials
_db_creds = DBCredentials().get("RabbitMQ")
DEFAULT_USER = _db_creds.user
DEFAULT_PASSWORD = _db_creds.password
except:
pass
# default exchange to use for publishing messages
DEFAULT_BUSNAME = adaptNameToEnvironment("lofar")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment