#include "../idatabase.h"\r
#include "../ilogger.h"\r
#include "../option.h"\r
-#include "../datetime.h"\r
#include "../stringfunctions.h"\r
#include "ifreenetregistrable.h"\r
#include "ifcpconnected.h"\r
#include "ifcpmessagehandler.h"\r
#include "iperiodicprocessor.h"\r
\r
+#include <Poco/DateTime.h>\r
+#include <Poco/Timestamp.h>\r
+#include <Poco/Timespan.h>\r
+\r
#ifdef XMEM\r
#include <xmem.h>\r
#endif\r
\r
std::vector<IDTYPE> m_inserting; // list of ids we are inserting\r
std::string m_messagebase;\r
- DateTime m_lastchecked;\r
+ Poco::DateTime m_lastchecked;\r
\r
// these MUST be populated by child class\r
std::string m_fcpuniquename;\r
// make sure variables have been initialized by the derived class\r
if(m_fcpuniquename=="")\r
{\r
- m_log->WriteLog(LogFile::LOGLEVEL_FATAL,"IIndexInserter<IDTYPE>::FCPConnected fcpuniquename not initialized correctly!");\r
+ m_log->fatal("IIndexInserter<IDTYPE>::FCPConnected fcpuniquename not initialized correctly!");\r
}\r
if(m_fcpuniquename.find("|")!=std::string::npos)\r
{\r
- m_log->WriteLog(LogFile::LOGLEVEL_FATAL,"IIndexInserter<IDTYPE>::FCPConnected fcpuniquename contains | character! This is not a valid character!");\r
+ m_log->fatal("IIndexInserter<IDTYPE>::FCPConnected fcpuniquename contains | character! This is not a valid character!");\r
}\r
\r
m_inserting.clear();\r
StringFunctions::Split(message["Identifier"],"|",idparts);\r
StringFunctions::Convert(idparts[1],id);\r
RemoveFromInsertList(id);\r
+ m_log->debug("IIndexInserter<IDTYPE>::HandleMessage IdentifierCollision for "+m_fcpuniquename+" "+message["Identifier"]);\r
return true;\r
}\r
}\r
{\r
m_fcpuniquename="";\r
Option::Instance()->Get("MessageBase",m_messagebase);\r
- m_lastchecked.SetToGMTime();\r
+ m_lastchecked=Poco::Timestamp();\r
}\r
\r
template <class IDTYPE>\r
void IIndexInserter<IDTYPE>::Process()\r
{\r
- DateTime now;\r
- now.SetToGMTime();\r
+ Poco::DateTime now;\r
\r
- if(m_lastchecked<(now-(1.0/1440.0)))\r
+ if(m_lastchecked<(now-Poco::Timespan(0,0,1,0,0)))\r
{\r
CheckForNeededInsert();\r
m_lastchecked=now;\r