Browse Source

Reduce height warning sensitivity

Stuart Johnson 1 year ago
parent
commit
0ba7eed461
3 changed files with 14 additions and 32 deletions
  1. 10 30
      .vs/TFA-Bot/xs/UserPrefs.xml
  2. 1 1
      TFA-Bot/DataClasses/clsNode.cs
  3. 3 1
      TFA-Bot/Program.cs

+ 10 - 30
.vs/TFA-Bot/xs/UserPrefs.xml

@@ -2,33 +2,15 @@
   <MonoDevelop.Ide.ItemProperties.TFA-Bot PreferredExecutionTarget="MonoDevelop.Default" />
   <MonoDevelop.Ide.Workbench ActiveDocument="TFA-Bot Status">
     <Files>
-      <File FileName="TFA-Bot/DiscordBot/Commands/clsNetworks.cs" Line="23" Column="37" />
-      <File FileName="TFA-Bot/DiscordBot/Commands/clsListNodes.cs" Line="1" Column="1" />
-      <File FileName="TFA-Bot/DataClasses/clsNetwork.cs" Line="1" Column="1" />
-      <File FileName="TFA-Bot/clsExtenstions.cs" Line="1" Column="1" />
-      <File FileName="TFA-Bot/DataClasses/clsNodeGroup.cs" Line="16" Column="38" />
-      <File FileName="TFA-Bot/DiscordBot/Commands/clsEmail.cs" Line="1" Column="1" />
-      <File FileName="TFA-Bot/DiscordBot/clsCommands.cs" Line="86" Column="89" />
-      <File FileName="TFA-Bot/DataClasses/clsSetting.cs" Line="1" Column="1" />
-      <File FileName="TFA-Bot/DataClasses/clsNotificationPolicy.cs" Line="1" Column="1" />
+      <File FileName="TFA-Bot/DataClasses/clsNode.cs" Line="97" Column="62" />
       <File FileName="TFA-Bot/Spreadsheet/clsSpreadsheetReader.cs" Line="125" Column="1" />
-      <File FileName="TFA-Bot/Program.cs" Line="47" Column="32" />
-      <File FileName="TFA-Bot/Spreadsheet/ISpreadsheet.cs" Line="1" Column="1" />
-      <File FileName="TFA-Bot/Dialler/clsDialler.cs" Line="1" Column="1" />
-      <File FileName="TFA-Bot/DiscordBot/Commands/clsCall.cs" Line="1" Column="1" />
-      <File FileName="TFA-Bot/Dialler/clsDiallerSIP.cs" Line="1" Column="1" />
-      <File FileName="TFA-Bot/Dialler/clsDiallerTwilio.cs" Line="41" Column="51" />
-      <File FileName="TFA-Bot/DiscordBot/clsBotClient.cs" Line="105" Column="1" />
-      <File FileName="TFA-Bot/DiscordBot/Commands/clsMTR.cs" Line="1" Column="1" />
-      <File FileName="TFA-Bot/Dialler/IDialler.cs" Line="1" Column="1" />
-      <File FileName="TFA-Bot/Utils/clsRollingAverage.cs" Line="32" Column="1" />
-      <File FileName="TFA-Bot/DiscordBot/Commands/clsGitCommand.cs" Line="10" Column="2" />
-      <File FileName="TFA-Bot/Git/clsGit.cs" Line="124" Column="64" />
-      <File FileName="TFA-Bot/Git/clsGitHead.cs" Line="1" Column="1" />
       <File FileName="TFA-Bot/DiscordBot/Commands/clsHelp.cs" Line="24" Column="54" />
-      <File FileName="TFA-Bot/clsEmail.cs" Line="59" Column="43" />
-      <File FileName="entrypoint.sh" Line="29" Column="37" />
-      <File FileName="TFA-Bot/DataClasses/clsNode.cs" Line="74" Column="17" />
+      <File FileName="TFA-Bot/DiscordBot/Commands/clsNetworks.cs" Line="34" Column="34" />
+      <File FileName="TFA-Bot/DataClasses/clsNetwork.cs" Line="138" Column="60" />
+      <File FileName="TFA-Bot/clsExtenstions.cs" Line="57" Column="30" />
+      <File FileName="TFA-Bot/DiscordBot/Commands/clsListNodes.cs" Line="21" Column="65" />
+      <File FileName="TFA-Bot/Program.cs" Line="179" Column="22" />
+      <File FileName="TFA-Bot/DataClasses/clsNodeGroup.cs" Line="73" Column="30" />
       <File FileName="TFA-Bot Status" />
     </Files>
     <Pads>
@@ -39,11 +21,13 @@
             <Node name="TFA-Bot" expanded="True" selected="True">
               <Node name="Packages" expanded="True" />
               <Node name="DataClasses" expanded="True" />
+              <Node name="Dialler" expanded="True" />
               <Node name="DiscordBot" expanded="True">
                 <Node name="Commands" expanded="True" />
               </Node>
               <Node name="Git" expanded="True" />
               <Node name="Spreadsheet" expanded="True" />
+              <Node name="Utils" expanded="True" />
             </Node>
           </Node>
         </State>
@@ -56,11 +40,7 @@
   <MonoDevelop.Ide.DebuggingService.PinnedWatches />
   <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
   <MonoDevelop.Ide.DebuggingService.Breakpoints>
-    <BreakpointStore>
-      <Breakpoint file="/HOME/Projects/TFA-Bot/TFA-Bot/clsCaller.cs" relfile="TFA-Bot/clsCaller.cs" line="144" column="1" />
-      <Breakpoint file="/HOME/Projects/TFA-Bot/TFA-Bot/DataClasses/clsNode.cs" relfile="TFA-Bot/DataClasses/clsNode.cs" line="247" column="1" />
-      <Catchpoint exceptionName="System.Exception" includeSubclasses="True" />
-    </BreakpointStore>
+    <BreakpointStore />
   </MonoDevelop.Ide.DebuggingService.Breakpoints>
   <MultiItemStartupConfigurations />
 </Properties>

+ 1 - 1
TFA-Bot/DataClasses/clsNode.cs

@@ -91,7 +91,7 @@ namespace TFABot
                     Program.AlarmManager.Clear(AlarmHeightLow,$"CLEARED: {Name} height low.");
                     AlarmHeightLow = null;
                  }
-                 else if (_heightLowCount > 5 && _requestFailCount ==0 && AlarmHeightLow==null )
+                 else if (_heightLowCount > 12 && _requestFailCount == 0 && AlarmHeightLow==null )
                  {
                     AlarmHeightLow = new clsAlarm(clsAlarm.enumAlarmType.Height,$"WARNING: {Name} height low.",this);
                     Program.AlarmManager.New(AlarmHeightLow);

+ 3 - 1
TFA-Bot/Program.cs

@@ -117,6 +117,8 @@ namespace TFABot
                    
                 Console.WriteLine("Starting monitoring");
                 const int apiTimeout = 2000;
+                const int loopWait = 3000;
+                
                 DateTime LastBotStart = DateTime.UtcNow;
                 using (Bot = new clsBotClient(DiscordToken))
                 {
@@ -168,7 +170,7 @@ namespace TFABot
                             }
                        }
                           
-                       ApplicationHold.WaitOne(3000);
+                       ApplicationHold.WaitOne(loopWait);
                     }
                 
                     Console.WriteLine($"Exit Code: {RunState} ({(int)RunState})");