Extend Yearly storage cutoff to 5 years

This commit is contained in:
2023-03-16 14:01:59 +01:00
parent abcb5c38f1
commit 916bd4bde3
+3
View File
@@ -358,6 +358,9 @@ void DataCondenser::CleanData(const RRA::type& rra)
{ {
std::string table = GetDestinationTable(rra); std::string table = GetDestinationTable(rra);
int periodInSeconds = static_cast<int>(rra) * 400; int periodInSeconds = static_cast<int>(rra) * 400;
if (rra == RRA::Yearly)
periodInSeconds *= 5;
int timestamp = DateTime::GetTimestamp() + DateTime::GetUTCOffset() - periodInSeconds; int timestamp = DateTime::GetTimestamp() + DateTime::GetUTCOffset() - periodInSeconds;
std::stringstream query; std::stringstream query;