changeset 611:d77323cdc55d

HousekeepingInterval
author Alain Mazy <am@orthanc.team>
date Tue, 17 Dec 2024 17:17:45 +0100
parents c2497f8bf5b6
children 5c5ee47a1403
files PostgreSQL/NEWS PostgreSQL/Plugins/IndexPlugin.cpp
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/PostgreSQL/NEWS	Mon Dec 16 19:06:43 2024 +0100
+++ b/PostgreSQL/NEWS	Tue Dec 17 17:17:45 2024 +0100
@@ -38,7 +38,8 @@
   - "TransactionMode": "ReadCommitted"
 * Introduced a new thread to perform DB Housekeeping at regular interval (5s) for the
   DB plugins requiring it (currently only PostgreSQL).  E.g: This avoids very long update
-  times in case you don't call /statistics for a long period.
+  times in case you don't call /statistics for a long period.  The execution interval of
+  this thread can be configured through "HousekeepingInterval".
 
 
 Release 6.2 (2024-03-25)
--- a/PostgreSQL/Plugins/IndexPlugin.cpp	Mon Dec 16 19:06:43 2024 +0100
+++ b/PostgreSQL/Plugins/IndexPlugin.cpp	Tue Dec 17 17:17:45 2024 +0100
@@ -79,7 +79,7 @@
     try
     {
       const size_t countConnections = postgresql.GetUnsignedIntegerValue("IndexConnectionsCount", 50);
-      const unsigned int housekeepingDelaySeconds = 5;  // TODO - PARAMETER
+      const unsigned int housekeepingDelaySeconds = postgresql.GetUnsignedIntegerValue("HousekeepingInterval", 1);
 
       OrthancDatabases::PostgreSQLParameters parameters(postgresql);
       OrthancDatabases::IndexBackend::Register(