From 405ce8892844fb969bb30a5bf09bfee291e13179 Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch> Date: Thu, 8 Feb 2018 17:28:25 +0100 Subject: [PATCH] Update service status at least once a minute. Restoring the "heartbeat" functionality without the overhead of serializing the XML every second. --- ATxService/AutoTx.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ATxService/AutoTx.cs b/ATxService/AutoTx.cs index 88ebd5d..b8dcbb0 100644 --- a/ATxService/AutoTx.cs +++ b/ATxService/AutoTx.cs @@ -495,6 +495,10 @@ namespace ATxService SendLowSpaceMail(SystemChecks.CheckFreeDiskSpace(_config.SpaceMonitoring)); UpdateServiceState(); + // update the status heartbeat at least once a minute: + if (TimeUtils.SecondsSince(_status.LastStatusUpdate) >= 60) + _status.Serialize(); + if (TimeUtils.SecondsSince(_lastUserDirCheck) >= 120) CreateIncomingDirectories(); -- GitLab