Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+11
-11
@@ -21,23 +21,23 @@ HandlerStaticMeteoData::HandlerStaticMeteoData(const std::shared_ptr<DdsHandler>
|
||||
|
||||
bool HandlerStaticMeteoData::init()
|
||||
{
|
||||
INFO_LOG() << "Start HandlerStaticMeteoData.";
|
||||
INFO_LOG(m_logger) << "Start HandlerStaticMeteoData.";
|
||||
|
||||
// read data from db-table 'mdm_static_meteo_data'
|
||||
QVector<Database::MdmStaticMeteoData> dataVec;
|
||||
if (!m_db->select(dataVec))
|
||||
{
|
||||
ERROR_LOG() << "Error reading data from database 'mdm_static_meteo_data'!";
|
||||
ERROR_LOG(m_logger) << "Error reading data from database 'mdm_static_meteo_data'!";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dataVec.isEmpty())
|
||||
{
|
||||
WARNING_LOG() << "DB table 'mdm_static_meteo_data' is empty! Try to create default entry.";
|
||||
WARNING_LOG(m_logger) << "DB table 'mdm_static_meteo_data' is empty! Try to create default entry.";
|
||||
|
||||
if (!insertDefaultStaticMeteoDataEntry())
|
||||
{
|
||||
ERROR_LOG() << "Insert DB table 'mdm_static_meteo_data' failed! No static meteo data may be handled!";
|
||||
ERROR_LOG(m_logger) << "Insert DB table 'mdm_static_meteo_data' failed! No static meteo data may be handled!";
|
||||
return false; // Damit werden alle moeglicherweise erreichbaren MDU's nicht bearbeitet,
|
||||
// da die Initialisierung des Service im 'SCM' mit Error beendet wird.
|
||||
}
|
||||
@@ -47,7 +47,7 @@ bool HandlerStaticMeteoData::init()
|
||||
|
||||
m_dbStaticMeteoData.timeStamp = QDateTime::currentMSecsSinceEpoch();
|
||||
|
||||
INFO_LOG() << "Insert into DB table 'mdm_static_meteo_data' successfully. id: "
|
||||
INFO_LOG(m_logger) << "Insert into DB table 'mdm_static_meteo_data' successfully. id: "
|
||||
<< m_dbStaticMeteoData.id;
|
||||
|
||||
onPublishData();
|
||||
@@ -56,7 +56,7 @@ bool HandlerStaticMeteoData::init()
|
||||
|
||||
if (dataVec.size() > 1)
|
||||
{
|
||||
WARNING_LOG() << "Invalid number of table entries for 'mdm_static_meteo_data' size:"
|
||||
WARNING_LOG(m_logger) << "Invalid number of table entries for 'mdm_static_meteo_data' size:"
|
||||
<< dataVec.size()
|
||||
<< " The first entry will be used only!";
|
||||
}
|
||||
@@ -70,7 +70,7 @@ bool HandlerStaticMeteoData::init()
|
||||
void HandlerStaticMeteoData::onStaticMeteoDataModifyRequest(const rti::core::SampleIdentity &cookie,
|
||||
const StaticMeteoDataModifyRequest &request)
|
||||
{
|
||||
INFO_LOG() << "onStaticMeteoDataModifyRequest: " << request;
|
||||
INFO_LOG(m_logger) << "onStaticMeteoDataModifyRequest: " << request;
|
||||
|
||||
Core::FunctionReplyObject rep(request.id());
|
||||
|
||||
@@ -93,7 +93,7 @@ bool HandlerStaticMeteoData::updateStaticMeteoDatainDB(const StaticMeteoDataModi
|
||||
{
|
||||
if (request.id() != m_dbStaticMeteoData.id)
|
||||
{
|
||||
WARNING_LOG() << "Invalid id for db-table 'mdm_static_meteo_data'"
|
||||
WARNING_LOG(m_logger) << "Invalid id for db-table 'mdm_static_meteo_data'"
|
||||
<< m_dbStaticMeteoData.id
|
||||
<< " correct id: " << m_dbStaticMeteoData.id;
|
||||
return false;
|
||||
@@ -119,10 +119,10 @@ void HandlerStaticMeteoData::onPublishData()
|
||||
ddsData.note(note);
|
||||
ddsData.weatherStationId(ddsData.id()); // MDUid == dbId
|
||||
|
||||
INFO_LOG() << "Publish static MeteoData to dds: " << ddsData;
|
||||
INFO_LOG(m_logger) << "Publish static MeteoData to dds: " << ddsData;
|
||||
|
||||
if (!m_ddsHandler->dts()->publish(ddsData))
|
||||
ERROR_LOG() << "Error publishing static MdmMeteoData to dds";
|
||||
ERROR_LOG(m_logger) << "Error publishing static MdmMeteoData to dds";
|
||||
|
||||
} // end of onPublishData()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -141,7 +141,7 @@ bool HandlerStaticMeteoData::insertDefaultStaticMeteoDataEntry()
|
||||
|
||||
if (!m_db->insert(dbData))
|
||||
{
|
||||
ERROR_LOG() << "insertDefaultStaticMeteoDataEntry for db-table 'mdm_static_meteo_data' failed!";
|
||||
ERROR_LOG(m_logger) << "insertDefaultStaticMeteoDataEntry for db-table 'mdm_static_meteo_data' failed!";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user