Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
JAliEn
JAliEn-ROOT
Commits
cf671374
Commit
cf671374
authored
Jul 02, 2019
by
Volodymyr Yurchenko
Browse files
Print a message while connecting to JCentral
parent
67578530
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/TJAlienConnectionManager.cxx
View file @
cf671374
...
...
@@ -2,6 +2,7 @@
// Author: Volodymyr Yurchenko 27/06/2019
#include "TJAlienConnectionManager.h"
#include <iostream>
ClassImp
(
TJAlienConnectionManager
)
...
...
@@ -54,13 +55,16 @@ int TJAlienConnectionManager::CreateConnection()
return
0
;
}
std
::
cout
<<
"
\r
"
<<
"Opening connection to JCentral. Please wait"
<<
std
::
flush
;
for
(
int
i
=
0
;
i
<
dns_jcentral
.
lenght
();
i
++
)
{
std
::
cout
<<
"."
<<
std
::
flush
;
current_host
=
dns_jcentral
.
get_next_host
();
ConnectJCentral
(
co
,
current_host
);
if
(
connection_flag
)
{
std
::
cout
<<
"
\r
"
<<
std
::
flush
;
Info
(
"TJAlienConnectionManager"
,
"Successfully connected to %s"
,
current_host
.
c_str
());
co
.
password
=
""
;
fWSHost
=
default_server
;
...
...
@@ -72,6 +76,7 @@ int TJAlienConnectionManager::CreateConnection()
else
{
if
(
gDebug
>
0
)
{
std
::
cout
<<
"
\r
"
<<
std
::
flush
;
Error
(
"TJAlienConnectionManager"
,
"Failed to connect to %s - retrying..."
,
current_host
.
c_str
());
}
sleep
(
1
);
...
...
@@ -79,6 +84,7 @@ int TJAlienConnectionManager::CreateConnection()
}
creds
.
removeCredentials
(
co
.
kind
);
}
std
::
cout
<<
"
\r
"
<<
std
::
flush
;
Error
(
"TJAlienConnectionManager"
,
"Failed to connect to any server! Giving up"
);
return
-
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment