commit eb8c96f

grunfink  ·  2025-09-13 06:13:11 +0000 UTC
parent 02c5708
New configuration directive 'max_failing_days'.
1 files changed,  +2, -1
M data.c
M data.c
+2, -1
 1@@ -3060,7 +3060,8 @@ int instance_failure(const char *url, int op)
 2     case 0: /** check **/
 3         if ((mt = mtime(fn)) != 0.0) {
 4             /* grace time */
 5-            double seconds_failing = 30 * (24 * 60 * 60);
 6+            double seconds_failing = xs_number_get(xs_dict_get_def(srv_config, "max_failing_days", "30"))
 7+                * (24 * 60 * 60);
 8 
 9             if ((double)time(NULL) - mt > seconds_failing)
10                 ret = -1;