Skip to content
GitLab
Explore
Sign in
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
6e9dd31f
Commit
6e9dd31f
authored
4 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-152
: removed print statement again for debugging the failing build pipeline
parent
92ac0620
No related branches found
No related tags found
1 merge request
!180
Resolve TMSS-152
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
LCS/Messaging/python/messaging/config.py
+5
-7
5 additions, 7 deletions
LCS/Messaging/python/messaging/config.py
with
5 additions
and
7 deletions
LCS/Messaging/python/messaging/config.py
+
5
−
7
View file @
6e9dd31f
...
@@ -36,9 +36,7 @@ if isProductionEnvironment() or isTestEnvironment():
...
@@ -36,9 +36,7 @@ if isProductionEnvironment() or isTestEnvironment():
def
broker_url
(
hostname
:
str
=
DEFAULT_BROKER
,
port
:
int
=
DEFAULT_PORT
,
userid
:
str
=
DEFAULT_USER
,
password
:
str
=
DEFAULT_PASSWORD
)
->
str
:
def
broker_url
(
hostname
:
str
=
DEFAULT_BROKER
,
port
:
int
=
DEFAULT_PORT
,
userid
:
str
=
DEFAULT_USER
,
password
:
str
=
DEFAULT_PASSWORD
)
->
str
:
url
=
'
amqp://%s:%s@%s:%d//
'
%
(
userid
,
password
,
hostname
,
port
)
return
'
amqp://%s:%s@%s:%d//
'
%
(
userid
,
password
,
hostname
,
port
)
print
(
url
)
return
url
if
DEFAULT_PORT
==
-
1
:
if
DEFAULT_PORT
==
-
1
:
possible_ports
=
[
5672
,
5675
]
possible_ports
=
[
5672
,
5675
]
...
@@ -50,13 +48,13 @@ else:
...
@@ -50,13 +48,13 @@ else:
for
port
in
possible_ports
:
for
port
in
possible_ports
:
try
:
try
:
print
(
"
trying to connect to broker: hostname=%s port=%s userid=%s password=***
"
%
(
logger
.
debug
(
"
trying to connect to broker: hostname=%s port=%s userid=%s password=***
"
,
DEFAULT_BROKER
,
port
,
DEFAULT_USER
)
)
DEFAULT_BROKER
,
port
,
DEFAULT_USER
)
with
kombu
.
Connection
(
broker_url
(
port
=
port
),
max_retries
=
0
,
connect_timeout
=
1
,
)
as
connection
:
with
kombu
.
Connection
(
broker_url
(
port
=
port
),
max_retries
=
0
,
connect_timeout
=
1
,
)
as
connection
:
connection
.
connect
()
connection
.
connect
()
DEFAULT_PORT
=
port
DEFAULT_PORT
=
port
print
(
"
detected rabbitmq broker to which we can connect with hostname=%s port=%s userid=%s password=***
"
%
(
logger
.
info
(
"
detected rabbitmq broker to which we can connect with hostname=%s port=%s userid=%s password=***
"
,
DEFAULT_BROKER
,
port
,
DEFAULT_USER
)
)
DEFAULT_BROKER
,
port
,
DEFAULT_USER
)
break
break
except
Exception
as
e
:
except
Exception
as
e
:
logger
.
debug
(
"
cannot connect to broker: hostname=%s port=%s userid=%s password=*** error=%s
"
,
logger
.
debug
(
"
cannot connect to broker: hostname=%s port=%s userid=%s password=*** error=%s
"
,
...
...
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