Quellcode durchsuchen

Extend Yearly storage cutoff to 5 years

JDierkse vor 2 Jahren
Ursprung
Commit
916bd4bde3
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. 3 0
      DataInterface/DataCondenser.cpp

+ 3 - 0
DataInterface/DataCondenser.cpp

@@ -358,6 +358,9 @@ void DataCondenser::CleanData(const RRA::type& rra)
 {
 	std::string table = GetDestinationTable(rra);
 	int periodInSeconds = static_cast<int>(rra) * 400;
+	if (rra == RRA::Yearly)
+		periodInSeconds *= 5;
+
 	int timestamp = DateTime::GetTimestamp() + DateTime::GetUTCOffset() - periodInSeconds;
 
 	std::stringstream query;