Skip to content
Snippets Groups Projects
Commit 8a042f18 authored by Marco De Marco's avatar Marco De Marco
Browse files

Elapsed time fix

parent fb8d2ecb
No related branches found
No related tags found
No related merge requests found
...@@ -59,6 +59,7 @@ void ProtocolManager::updateNewList() throw(std::runtime_error) ...@@ -59,6 +59,7 @@ void ProtocolManager::updateNewList() throw(std::runtime_error)
<< boost::posix_time::to_simple_string(m_lastTimestamp) << endl; << boost::posix_time::to_simple_string(m_lastTimestamp) << endl;
m_newFileRowset_sp = m_dBManager_sp->retrieveNewFiles(m_lastTimestamp); m_newFileRowset_sp = m_dBManager_sp->retrieveNewFiles(m_lastTimestamp);
m_newFileRowsetIt = m_newFileRowset_sp->begin(); m_newFileRowsetIt = m_newFileRowset_sp->begin();
} }
...@@ -70,9 +71,8 @@ void ProtocolManager::updateFailedList() throw(std::runtime_error) ...@@ -70,9 +71,8 @@ void ProtocolManager::updateFailedList() throw(std::runtime_error)
DEBUG_STREAM << "ProtocolManager::updateFailedList()" << endl; DEBUG_STREAM << "ProtocolManager::updateFailedList()" << endl;
m_failedFileRowset_sp = m_dBManager_sp->retrieveFailedFiles(); m_failedFileRowset_sp = m_dBManager_sp->retrieveFailedFiles();
m_failedFileRowsetIt = m_failedFileRowset_sp->begin();
m_recoveryModeTime = boost::posix_time::second_clock::local_time(); m_failedFileRowsetIt = m_failedFileRowset_sp->begin();
} }
//============================================================================== //==============================================================================
...@@ -129,9 +129,13 @@ bool ProtocolManager::isRecoveryTimeElapsed() ...@@ -129,9 +129,13 @@ bool ProtocolManager::isRecoveryTimeElapsed()
boost::posix_time::time_duration diff = now - m_recoveryModeTime; boost::posix_time::time_duration diff = now - m_recoveryModeTime;
DEBUG_STREAM << "ProtocolManager::isRecoveryTimeElapsed() " << diff.total_seconds()
<< "/" << (int)m_configuration_sp->getRecoveryTime() << endl;
if(diff.total_seconds() > (int)m_configuration_sp->getRecoveryTime()) if(diff.total_seconds() > (int)m_configuration_sp->getRecoveryTime())
{ {
DEBUG_STREAM << "ProtocolManager::isRecoveryTimeElapsed() true" << endl; DEBUG_STREAM << "ProtocolManager::isRecoveryTimeElapsed() true" << endl;
m_recoveryModeTime = now;
return true; return true;
} }
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment