Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
@@ -36,17 +36,17 @@ bool DbReader::loadPlugin(const LtsPluginManager::PluginInstance &pi)
|
||||
RecordReplay::RecordReplayPlugin *recPlugin = qobject_cast<RecordReplay::RecordReplayPlugin*>(pi.plugin);
|
||||
if (!recPlugin)
|
||||
{
|
||||
ERROR_LOG() << "Cannot load RecordReplayPlugin " << pi.fileName;
|
||||
ERROR_LOG(m_logger) << "Cannot load RecordReplayPlugin " << pi.fileName;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!recPlugin->initDts(m_ddsConnector, m_exerciseId, m_bCanHandleSchemas, *m_query))
|
||||
{
|
||||
ERROR_LOG() << "Initialisation for RecordReplayPlugin " << pi.fileName << " failed ";
|
||||
ERROR_LOG(m_logger) << "Initialisation for RecordReplayPlugin " << pi.fileName << " failed ";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << "Loaded record replay plugin " << recPlugin->pluginName();
|
||||
INFO_LOG(m_logger) << "Loaded record replay plugin " << recPlugin->pluginName();
|
||||
m_plugins.push_back(recPlugin);
|
||||
|
||||
return true;
|
||||
@@ -67,67 +67,67 @@ bool DbReader::init(const QSqlDatabase &db)
|
||||
|
||||
bool DbReader::setReplayStartTime(qint64 startTime)
|
||||
{
|
||||
INFO_LOG() << "IN setReplayStartTime " << startTime;
|
||||
INFO_LOG(m_logger) << "IN setReplayStartTime " << startTime;
|
||||
if (!m_query)
|
||||
{
|
||||
WARNING_LOG() << "Internal error - no query!";
|
||||
WARNING_LOG(m_logger) << "Internal error - no query!";
|
||||
return false;
|
||||
}
|
||||
for (RecordReplay::RecordReplayPlugin *recPlugin : m_plugins)
|
||||
{
|
||||
INFO_LOG() << "IN setReplayStartTime, current Plugin: " << recPlugin->pluginName()
|
||||
INFO_LOG(m_logger) << "IN setReplayStartTime, current Plugin: " << recPlugin->pluginName()
|
||||
<< " typename=" << typeid(*recPlugin).name();
|
||||
if (!recPlugin->setReplayStartTime(*m_query, startTime))
|
||||
{
|
||||
WARNING_LOG() << "setReplayStartTime for plugin " << recPlugin->svcShortName() << " failed!";
|
||||
WARNING_LOG(m_logger) << "setReplayStartTime for plugin " << recPlugin->svcShortName() << " failed!";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
INFO_LOG() << "IN setReplayStartTime " << startTime << " DONE";
|
||||
INFO_LOG(m_logger) << "IN setReplayStartTime " << startTime << " DONE";
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DbReader::readData(qint64 fromTime, qint64 toTime)
|
||||
{
|
||||
INFO_LOG() << "IN readData " << fromTime << " to " << toTime;
|
||||
INFO_LOG(m_logger) << "IN readData " << fromTime << " to " << toTime;
|
||||
if (!m_query)
|
||||
{
|
||||
WARNING_LOG() << "Internal error - no query!";
|
||||
WARNING_LOG(m_logger) << "Internal error - no query!";
|
||||
return false;
|
||||
}
|
||||
for (RecordReplay::RecordReplayPlugin *recPlugin : m_plugins)
|
||||
{
|
||||
if (!recPlugin->ddsTopicsFromDatabase(*m_query, fromTime, toTime))
|
||||
{
|
||||
WARNING_LOG() << "ddsTopicsFromDatabase for plugin " << recPlugin->svcShortName() << " failed!";
|
||||
WARNING_LOG(m_logger) << "ddsTopicsFromDatabase for plugin " << recPlugin->svcShortName() << " failed!";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
INFO_LOG() << "IN readData " << fromTime << " to " << toTime << " DONE";
|
||||
INFO_LOG(m_logger) << "IN readData " << fromTime << " to " << toTime << " DONE";
|
||||
return true;
|
||||
}
|
||||
|
||||
void DbReader::publish(qint64 desiredTime)
|
||||
{
|
||||
INFO_LOG() << "IN publish " << desiredTime;
|
||||
INFO_LOG(m_logger) << "IN publish " << desiredTime;
|
||||
for (RecordReplay::RecordReplayPlugin *recPlugin : m_plugins)
|
||||
if (!recPlugin->publishData(desiredTime))
|
||||
WARNING_LOG() << "publishData for plugin " << recPlugin->svcShortName() << " failed!";
|
||||
INFO_LOG() << "IN publish " << desiredTime << " DONE";
|
||||
WARNING_LOG(m_logger) << "publishData for plugin " << recPlugin->svcShortName() << " failed!";
|
||||
INFO_LOG(m_logger) << "IN publish " << desiredTime << " DONE";
|
||||
}
|
||||
|
||||
void DbReader::waitForAsyncOperations(qint64 desiredTime)
|
||||
{
|
||||
INFO_LOG() << "IN waitForAsyncOperations " << desiredTime;
|
||||
INFO_LOG(m_logger) << "IN waitForAsyncOperations " << desiredTime;
|
||||
for (RecordReplay::RecordReplayPlugin *recPlugin : m_plugins)
|
||||
if (!recPlugin->waitForAsyncOperations(desiredTime))
|
||||
WARNING_LOG() << "waitForAsyncOperations for plugin " << recPlugin->svcShortName() << " failed!";
|
||||
WARNING_LOG(m_logger) << "waitForAsyncOperations for plugin " << recPlugin->svcShortName() << " failed!";
|
||||
}
|
||||
|
||||
|
||||
void DbReader::clearData()
|
||||
{
|
||||
INFO_LOG() << "IN clearData";
|
||||
INFO_LOG(m_logger) << "IN clearData";
|
||||
for (RecordReplay::RecordReplayPlugin *recPlugin : m_plugins)
|
||||
recPlugin->clearData();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user