diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-11-14 14:44:41 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-11-14 14:44:41 +0200 |
| commit | 3c8beb9077c982ba19a8e68b9a36abc065cb4269 (patch) | |
| tree | fb1d79ffc431ad1d203f2f172e37d0443b5eff06 /Software/Visual_Studio/PPC/Tango.PPC.Common/SMS | |
| parent | 7d9ab3b87aed944167d77244b00fbdd4224725e2 (diff) | |
| download | Tango-3c8beb9077c982ba19a8e68b9a36abc065cb4269.tar.gz Tango-3c8beb9077c982ba19a8e68b9a36abc065cb4269.zip | |
PPC_v2.2.11
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/SMS')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/SMS/DefaultSMSNotificationProvider.cs | 18 |
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 { } } } } |
