diff --git a/Vrh.Log4Pro.MaintenanceConsole/Manager - SQLDataBaseManager.cs b/Vrh.Log4Pro.MaintenanceConsole/Manager - SQLDataBaseManager.cs index e766771..89bee80 100644 --- a/Vrh.Log4Pro.MaintenanceConsole/Manager - SQLDataBaseManager.cs +++ b/Vrh.Log4Pro.MaintenanceConsole/Manager - SQLDataBaseManager.cs @@ -2075,9 +2075,11 @@ GO runresult = 1; if (exceptioncounter > MAXEXCEPTIONS) { return Finalize(1, multirunresult); } } - var exitfromloop = (ExitAtThisPoint?.Invoke(Finalize(runresult, loople), new TimeSpan(0, 0, 5))) ?? false; + var waitforexitloopTS = par_delaybetweenruns.Ticks > new TimeSpan(0, 0, 5).Ticks ? par_delaybetweenruns : new TimeSpan(0, 0, 5); + var exitfromloop = (ExitAtThisPoint?.Invoke(Finalize(runresult, loople), waitforexitloopTS)) ?? false; if (exitfromloop) { Add(multirunresult, $"Exit requested by user"); break; } - Thread.Sleep((int)(par_delaybetweenruns.TotalMilliseconds)); + var remainingMSforsleep = par_delaybetweenruns.Add(waitforexitloopTS.Negate()).TotalMilliseconds; + if (remainingMSforsleep > 0) { Thread.Sleep((int)(remainingMSforsleep)); } } //get minimum date in the database diff --git a/Vrh.Log4Pro.MaintenanceConsole/Program.cs b/Vrh.Log4Pro.MaintenanceConsole/Program.cs index df20ddf..ec824e3 100644 --- a/Vrh.Log4Pro.MaintenanceConsole/Program.cs +++ b/Vrh.Log4Pro.MaintenanceConsole/Program.cs @@ -39,8 +39,7 @@ namespace Vrh.Log4Pro.MaintenanceConsole { static void Main(string[] args) { - //TESTS.TimeSpanFormatTest(); - //TESTS.MSMQTest(); + //bool xxxx = new TimeSpan(0, 0, 15).Add(new TimeSpan(0, 0, 25).Negate()).Ticks > 0; //return; var forcedmodulekey = CommandLine.GetCommandLineArgument(args, CLP.CMD_MODULE); var commandmode = !string.IsNullOrEmpty(forcedmodulekey); diff --git a/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs b/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs index 95331ee..f13bc6d 100644 --- a/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs +++ b/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.31.5.0")] -[assembly: AssemblyFileVersion("1.31.5.0")] +[assembly: AssemblyVersion("1.31.6.0")] +[assembly: AssemblyFileVersion("1.31.6.0")] -- libgit2 0.21.2