Commit b98bdff6 authored by Alessio Netti's avatar Alessio Netti
Browse files

Sensor metadata is not de-allocated anymore after auto-publish

parent a8baafa3
......@@ -112,18 +112,7 @@ void AnalyticsController::run() {
publishSensors();
vector<op_dl_t>& _analyticsPlugins = _manager->getPlugins();
// De-allocating metadata for all sensors - after auto-publish it is not needed anymore
for(auto& p: _analyticsPlugins)
for(auto& op: p.configurator->getOperators()) {
for (auto &u: op->getUnits()) {
for (auto &s: u->getBaseOutputs())
s->clearMetadata();
for (auto &s: u->getBaseInputs())
s->clearMetadata();
}
op->releaseUnits();
}
DCDB::SensorId sid;
list<DCDB::SensorDataStoreReading> readings;
boost::lockfree::spsc_queue<reading_t> *sensorQueue;
......
......@@ -98,27 +98,7 @@ void MQTTPusher::push() {
//Performing auto-publish if necessary
sendMappings();
// De-allocating metadata for all sensors - after auto-publish it is not needed anymore
for(auto& p: _plugins) {
for (auto &g: p.configurator->getSensorGroups()) {
for (auto &s: g->acquireSensors()) {
s->clearMetadata();
}
g->releaseSensors();
}
}
for(auto& p: _operatorPlugins)
for(auto& op: p.configurator->getOperators()) {
for (auto &u: op->getUnits()) {
for (auto &s: u->getBaseOutputs())
s->clearMetadata();
for (auto &s: u->getBaseInputs())
s->clearMetadata();
}
op->releaseUnits();
}
computeMsgRate();
//collect sensor-data
reading_t* reads = new reading_t[SensorBase::QUEUE_MAXLIMIT];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment