瀏覽代碼

Extend Yearly storage cutoff to 5 years

JDierkse 2 年之前
父節點
當前提交
916bd4bde3
共有 1 個文件被更改,包括 3 次插入0 次删除
  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;