Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
d35638f2
Commit
d35638f2
authored
5 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
SW-772
: only read rabbitmq credentials on production/test
parent
8172038d
No related branches found
No related tags found
1 merge request
!8
Cobalt2 multithreading fix
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
LCS/Messaging/python/messaging/config.py
+13
-9
13 additions, 9 deletions
LCS/Messaging/python/messaging/config.py
with
13 additions
and
9 deletions
LCS/Messaging/python/messaging/config.py
+
13
−
9
View file @
d35638f2
...
...
@@ -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
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment