Skip to content
Snippets Groups Projects
Commit 659ad63d authored by Eric Cano's avatar Eric Cano
Browse files

Fixed agent objet removing its representation when accessed in "just visit" mode.

Improved agent name layout.
Added printouts in test program.
parent b9cc8a12
No related branches found
No related tags found
No related merge requests found
......@@ -41,10 +41,10 @@ void Agent::setup(const std::string & typeName) {
<< 1900 + localNow.tm_year
<< std::setfill('0') << std::setw(2)
<< 1 + localNow.tm_mon
<< localNow.tm_mday << "-"
<< localNow.tm_hour << ":"
<< localNow.tm_min << ":"
<< localNow.tm_sec;
<< std::setw(2) << localNow.tm_mday << "-"
<< std::setw(2) << localNow.tm_hour << ":"
<< std::setw(2) << localNow.tm_min << ":"
<< std::setw(2) << localNow.tm_sec;
ObjectOps<cta::objectstore::Agent>::setName(aid.str());
m_setupDone = true;
}
......@@ -78,7 +78,7 @@ Agent::~Agent() {
for (size_t i=0; i < c_handleCount; i++) {
m_contexts[i].release();
}
if (m_creationDone) {
if (m_creationDone && !m_observerVersion) {
try {
remove();
RootEntry re(*this);
......
......@@ -65,8 +65,14 @@ int main(void){
// Get hold of the root entry
RootEntry re(self);
// Create and populate the job queues
std::cout << "About to add agentRegister" << std::endl;
AgentRegister agentRegister(re.allocateOrGetAgentRegister(self), self);
std::cout << osd.dump(self) << std::endl;
// Create the job pool
std::cout << "About to add job pool" << std::endl;
JobPool jobPool(re.allocateOrGetJobPool(self), self);
std::cout << osd.dump(self) << std::endl;
// Dump again
std::cout << osd.dump(self) << std::endl;
} catch (std::exception &e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment