From 916bd4bde308aeb78a4f04ff81aa2479fba30af3 Mon Sep 17 00:00:00 2001 From: JDierkse Date: Thu, 16 Mar 2023 14:01:59 +0100 Subject: [PATCH] Extend Yearly storage cutoff to 5 years --- DataInterface/DataCondenser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DataInterface/DataCondenser.cpp b/DataInterface/DataCondenser.cpp index fe3ca47..f19cb99 100644 --- a/DataInterface/DataCondenser.cpp +++ b/DataInterface/DataCondenser.cpp @@ -358,6 +358,9 @@ void DataCondenser::CleanData(const RRA::type& rra) { std::string table = GetDestinationTable(rra); int periodInSeconds = static_cast(rra) * 400; + if (rra == RRA::Yearly) + periodInSeconds *= 5; + int timestamp = DateTime::GetTimestamp() + DateTime::GetUTCOffset() - periodInSeconds; std::stringstream query;