From 25f327c090554691f24cfd2194e62b4890ef035d Mon Sep 17 00:00:00 2001
From: Joao Afonso <joao.afonso@cern.ch>
Date: Mon, 19 Dec 2022 18:24:40 +0100
Subject: [PATCH] Increase time after which a drive will be marked as STALE to
 4 hours

---
 ReleaseNotes.md                   | 1 +
 cmdline/CtaAdminTextFormatter.cpp | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/ReleaseNotes.md b/ReleaseNotes.md
index 1b54392377..4398d81f78 100644
--- a/ReleaseNotes.md
+++ b/ReleaseNotes.md
@@ -9,6 +9,7 @@
 - cta/CTA#230 - Modify CTA code to enforce VID uppercase
 - cta/CTA#239 - Add improvments to the cta-change-storage-class tool
 - cta/CTA#248 - Clean up output from cta-readtp
+- cta/CTA#251 - Increase free drive STALE threshold to 4 hours
 ### Bug Fixes
 - cta/CTA#234 - Replace stoi with toUint64 in standalone cli tool
 - cta/CTA#238 - Compilation fails when using cta::common::Configuration::getConfEntInt(...)
diff --git a/cmdline/CtaAdminTextFormatter.cpp b/cmdline/CtaAdminTextFormatter.cpp
index e30aa67ab5..49db6fae18 100644
--- a/cmdline/CtaAdminTextFormatter.cpp
+++ b/cmdline/CtaAdminTextFormatter.cpp
@@ -271,7 +271,7 @@ void TextFormatter::print(const DriveLsItem &drls_item)
 {
   //using namespace cta::common::dataStructures;
 
-  const int DRIVE_TIMEOUT = 600; // Time after which a drive will be marked as STALE
+  const int DRIVE_TIMEOUT = 14400; // Time after which a drive will be marked as STALE (4 hours)
 
   std::string driveStatusSince;
   std::string filesTransferredInSession;
-- 
GitLab