aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/SMS/DefaultSMSNotificationProvider.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/SMS/DefaultSMSNotificationProvider.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/SMS/DefaultSMSNotificationProvider.cs18
1 files changed, 12 insertions, 6 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/SMS/DefaultSMSNotificationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/SMS/DefaultSMSNotificationProvider.cs
index 0b810bb52..7452ea987 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/SMS/DefaultSMSNotificationProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/SMS/DefaultSMSNotificationProvider.cs
@@ -35,11 +35,14 @@ namespace Tango.PPC.Common.SMS
{
if (e.Job.Designation == BL.Enumerations.JobDesignations.Default)
{
- try
+ if (e.JobHandler.Status.ProgressMinusSettingUp > _settings.SMSNotificationSettings.MinimumNotificationMeters)
{
- await SendMessage($"Job '{e.Job.Name}' failed at position {Math.Round(e.JobHandler.Status.ProgressMinusSettingUp, 1)}\n{e.Exception.Message}.");
+ try
+ {
+ await SendMessage($"Job '{e.Job.Name}' failed at position {Math.Round(e.JobHandler.Status.ProgressMinusSettingUp, 1)}\n{e.Exception.Message}.");
+ }
+ catch { }
}
- catch { }
}
}
}
@@ -50,11 +53,14 @@ namespace Tango.PPC.Common.SMS
{
if (e.Job.Designation == BL.Enumerations.JobDesignations.Default)
{
- try
+ if (e.JobHandler.Status.ProgressMinusSettingUp > _settings.SMSNotificationSettings.MinimumNotificationMeters)
{
- await SendMessage($"Job '{e.Job.Name}' has completed successfully.");
+ try
+ {
+ await SendMessage($"Job '{e.Job.Name}' has completed successfully.");
+ }
+ catch { }
}
- catch { }
}
}
}