Skip to content
Snippets Groups Projects
Commit b28878a0 authored by Michael Davis's avatar Michael Davis
Browse files

[lpa_stream] QueueItor++ increments to next queue at the end of a queue

parent 37cd6f6e
No related branches found
No related tags found
No related merge requests found
......@@ -74,19 +74,32 @@ public:
* except when we are limited to one tapepool/vid.
*/
void operator++() {
m_isEndQueue = false;
m_jobCache.pop_front();
if(m_jobCache.empty()) {
updateJobCache();
if(m_jobCache.empty()) {
// We have reached the end of the current queue,
m_isEndQueue = true;
nextJobQueue();
// advance to next queue which contains jobs
for(nextJobQueue(); m_jobQueuesQueueIt != m_jobQueuesQueue.end(); nextJobQueue()) {
getJobQueue();
if(!m_jobCache.empty()) break;
}
}
}
}
/*!
* Resets end queue flag
*
* This is required if we want to detect when we have reached the end of each queue, for example
* when calculating summary statistics.
*/
void beginq() {
m_isEndQueue = false;
}
/*!
* True if the last call to operator++() took us past the end of a queue
*/
......
......@@ -105,7 +105,7 @@ public:
auto qid = m_queueItor.qid();
for( ; !m_queueItor.endq(); ++m_queueItor) {
for(m_queueItor.beginq(); !m_queueItor.endq(); ++m_queueItor) {
++total_files;
total_size += fileSize(*m_queueItor);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment