From 17d71efdeb0f646417fa2f6aed80cf5ea7b7720e Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Thu, 15 Feb 2018 16:21:14 +0100
Subject: [PATCH] Make ServiceTimer optional.

Refers to #29
---
 ATxCommon/Serializables/ServiceConfig.cs | 10 +++++-----
 Resources/conf/config.common.xml         |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/ATxCommon/Serializables/ServiceConfig.cs b/ATxCommon/Serializables/ServiceConfig.cs
index 5cd3d90..1414f50 100644
--- a/ATxCommon/Serializables/ServiceConfig.cs
+++ b/ATxCommon/Serializables/ServiceConfig.cs
@@ -57,11 +57,6 @@ namespace ATxCommon.Serializables
         /// </summary>
         public string TmpTransferDir { get; set; }
 
-        /// <summary>
-        /// The interval (in ms) for checking for new files and system parameters.
-        /// </summary>
-        public int ServiceTimer { get; set; }
-
         /// <summary>
         /// Maximum allowed CPU usage across all cores in percent. Running transfers will be paused
         /// if this limit is exceeded.
@@ -83,6 +78,11 @@ namespace ATxCommon.Serializables
         /// </summary>
         public bool Debug { get; set; } = false;
 
+        /// <summary>
+        /// The interval (in ms) for checking for new files and system parameters. Default: 1000.
+        /// </summary>
+        public int ServiceTimer { get; set; } = 1000;
+
         /// <summary>
         /// The name of a marker file to be placed in all **sub**directories
         /// inside the IncomingDirectory.
diff --git a/Resources/conf/config.common.xml b/Resources/conf/config.common.xml
index c985d94..eba6f5a 100644
--- a/Resources/conf/config.common.xml
+++ b/Resources/conf/config.common.xml
@@ -21,9 +21,6 @@
          to be used for running transfers -->
     <TmpTransferDir>d-vamp-dw</TmpTransferDir>
 
-    <!-- ServiceTimer: interval (in ms) for checking files and parameters -->
-    <ServiceTimer>1000</ServiceTimer>
-
     <!-- MaxCpuUsage: pause transfer if CPU usage is above this value (in %)-->
     <MaxCpuUsage>25</MaxCpuUsage>
 
@@ -36,6 +33,9 @@
     <!-- Debug: enable or disable debug log messages -->
     <Debug>true</Debug>
 
+    <!-- ServiceTimer: interval (in ms) for checking files and parameters -->
+    <ServiceTimer>1000</ServiceTimer>
+
     <!-- MarkerFile: a file to place in each user's incoming directory, the
          file itself will be ignored for the transfers -->
     <MarkerFile>_DO_NOT_ACQUIRE_HERE_.txt</MarkerFile>
-- 
GitLab