Skip to content

Commit ae35002

Browse files
committed
Use new User Agent in CCDB
1 parent a8e80c1 commit ae35002

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

CCDB/src/CcdbApi.cxx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
#include <algorithm>
4141
#include <filesystem>
4242
#include <boost/algorithm/string.hpp>
43-
#include <boost/asio/ip/host_name.hpp>
4443
#include <iostream>
4544
#include <mutex>
4645
#include <boost/interprocess/sync/named_semaphore.hpp>
4746
#include <regex>
4847
#include <cstdio>
4948
#include <string>
49+
#include <TAlienUserAgent.h>
5050
#include <unordered_set>
5151
#include "rapidjson/document.h"
5252
#include "rapidjson/writer.h"
@@ -117,13 +117,7 @@ CcdbApi::~CcdbApi()
117117

118118
void CcdbApi::setUniqueAgentID()
119119
{
120-
std::string host = boost::asio::ip::host_name();
121-
char const* jobID = getenv("ALIEN_PROC_ID");
122-
if (jobID) {
123-
mUniqueAgentID = fmt::format("{}-{}-{}-{}", host, getCurrentTimestamp() / 1000, o2::utils::Str::getRandomString(6), jobID);
124-
} else {
125-
mUniqueAgentID = fmt::format("{}-{}-{}", host, getCurrentTimestamp() / 1000, o2::utils::Str::getRandomString(6));
126-
}
120+
mUniqueAgentID = TAlienUserAgent::BasedOnEnvironment().ToString();
127121
}
128122

129123
bool CcdbApi::checkAlienToken()

0 commit comments

Comments
 (0)