Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+8
-9
@@ -16,26 +16,25 @@
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
|
||||
FrequencySetHandler::FrequencySetHandler(Interface::Dts *dts, DatabaseInterface *db)
|
||||
: m_dts(dts)
|
||||
, m_db(db)
|
||||
{
|
||||
FrequencySetHandler::FrequencySetHandler(Interface::Dts *dts, DatabaseInterface *db) : m_dts(dts)
|
||||
, m_db(db),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
Q_ASSERT(dts);
|
||||
Q_ASSERT(db);
|
||||
}
|
||||
|
||||
bool FrequencySetHandler::init()
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO;
|
||||
QVector<Database::AvmFrequencySet> frequencySets;
|
||||
|
||||
// Don't use select() with callback here as the callback (body of for-loop below) would use the DB, too.
|
||||
if (!m_db->select(frequencySets))
|
||||
{
|
||||
ERROR_LOG() << "Error while selecting frequency sets from db";
|
||||
ERROR_LOG(m_logger) << "Error while selecting frequency sets from db";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG() << "Found " << frequencySets.size() << " Frequency Sets";
|
||||
DEBUG_LOG(m_logger) << "Found " << frequencySets.size() << " Frequency Sets";
|
||||
|
||||
for (const Database::AvmFrequencySet ¤tfrequencySet : std::as_const(frequencySets))
|
||||
addFrequencySet(toDdsFrequencySet(currentfrequencySet));
|
||||
@@ -66,7 +65,7 @@ FrequencySet FrequencySetHandler::toDdsFrequencySet(const Database::AvmFrequency
|
||||
};
|
||||
m_db->selectByFrequencySetId(cb, result.id());
|
||||
|
||||
DEBUG_LOG() << "Frequency Set with ID " << dbData.id << " has " << result.data().size() << " data entries";
|
||||
DEBUG_LOG(m_logger) << "Frequency Set with ID " << dbData.id << " has " << result.data().size() << " data entries";
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -122,7 +121,7 @@ void FrequencySetHandler::addFrequencySet(const FrequencySet &frequencySet)
|
||||
m_frequencySetDatas.insert(frequencySet.id(), dataIds);
|
||||
|
||||
if (!m_dts->publish(frequencySet))
|
||||
ERROR_LOG() << "Error while publishing Frequency Set with id " << frequencySet.id();
|
||||
ERROR_LOG(m_logger) << "Error while publishing Frequency Set with id " << frequencySet.id();
|
||||
}
|
||||
|
||||
} // namespace AudioVideoManagement
|
||||
Reference in new issue
Block a user