Skip to content

Commit 9b1f2d5

Browse files
committed
CCDB: Option to disable alien-token check
Since now the ALIEN token is mandatory, there will be no need to check for it's presence (to determine code paths) anymore. Eventually, the check can be disabled completely. For now providing a env variable in order to be able to study some speed improvements (in a switchable way).
1 parent b7457d0 commit 9b1f2d5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

CCDB/src/CcdbApi.cxx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -774,12 +774,16 @@ bool CcdbApi::checkAlienToken() const
774774
LOG(debug) << "On macOS we simply rely on TGrid::Connect(\"alien\").";
775775
return true;
776776
#endif
777-
// a somewhat weird construction to programmatically find out if we
778-
// have a GRID token; Can be replaced with something more elegant once
779-
// alien-token-info does not ask for passwords interactively
777+
if (getenv("ALICEO2_CCDB_NOTOKENCHECK")) {
778+
// will be the default soon
779+
return true;
780+
}
780781
if (getenv("JALIEN_TOKEN_CERT")) {
781782
return true;
782783
}
784+
// a somewhat weird construction to programmatically find out if we
785+
// have a GRID token; Can be replaced with something more elegant once
786+
// alien-token-info does not ask for passwords interactively
783787
auto returncode = system("alien-token-info > /dev/null 2> /dev/null");
784788
if (returncode == -1) {
785789
LOG(error) << "system(\"alien-token-info\") call failed with internal fork/wait error";

0 commit comments

Comments
 (0)