From 175d1ea5ff603bf38e88b0239c85ffd5d05cd918 Mon Sep 17 00:00:00 2001
From: Eric Cano <Eric.Cano@cern.ch>
Date: Wed, 20 Jun 2018 17:14:57 +0200
Subject: [PATCH] Made archive queue algorithms more generic.

---
 objectstore/AlgorithmsTest.cpp         | 2 +-
 objectstore/ArchiveQueueAlgorithms.hpp | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/objectstore/AlgorithmsTest.cpp b/objectstore/AlgorithmsTest.cpp
index d2b4b97c4a..82c29691fc 100644
--- a/objectstore/AlgorithmsTest.cpp
+++ b/objectstore/AlgorithmsTest.cpp
@@ -51,7 +51,7 @@ TEST(ObjectStore, Algorithms) {
   re.initialize();
   re.insert();
   // Create the agent register
-    EntryLogSerDeser el("user0",
+  EntryLogSerDeser el("user0",
       "unittesthost", time(NULL));
   ScopedExclusiveLock rel(re);
   re.addOrGetAgentRegisterPointerAndCommit(agentRef, el, lc);
diff --git a/objectstore/ArchiveQueueAlgorithms.hpp b/objectstore/ArchiveQueueAlgorithms.hpp
index 280fa6fbc5..58d88e015f 100644
--- a/objectstore/ArchiveQueueAlgorithms.hpp
+++ b/objectstore/ArchiveQueueAlgorithms.hpp
@@ -46,22 +46,22 @@ public:
   
   static ElementAddress getElementAddress(const Element & e) { return e.archiveRequest->getAddressIfSet(); }
   
-  static void getLockedAndFetched(Container & cont, ScopedExclusiveLock & aqL, AgentReference & agRef, const ContainerIdentifyer & tapePool,
+  static void getLockedAndFetched(Container & cont, ScopedExclusiveLock & aqL, AgentReference & agRef, const ContainerIdentifyer & contId,
     log::LogContext & lc) {
-    Helpers::getLockedAndFetchedQueue<ArchiveQueue>(cont, aqL, agRef, tapePool, QueueType::LiveJobs, lc);
+    Helpers::getLockedAndFetchedQueue<Container>(cont, aqL, agRef, contId, QueueType::LiveJobs, lc);
   }
   
   static void addReferencesAndCommit(Container & cont, ElementMemoryContainer & elemMemCont,
       AgentReference & agentRef, log::LogContext & lc) {
     std::list<ArchiveQueue::JobToAdd> jobsToAdd;
     for (auto & e: elemMemCont) {
-      ArchiveRequest::JobDump jd;
+      ElementDescriptor jd;
       jd.copyNb = e.copyNb;
       jd.tapePool = cont.getTapePool();
       jd.owner = cont.getAddressIfSet();
       ArchiveRequest & ar = *e.archiveRequest;
       jobsToAdd.push_back({jd, ar.getAddressIfSet(), e.archiveFile.archiveFileID, e.archiveFile.fileSize,
-          e.mountPolicy, time(NULL)});
+          e.mountPolicy, time(nullptr)});
     }
     cont.addJobsAndCommit(jobsToAdd, agentRef, lc);
   }
-- 
GitLab