comment out alarm auto-ticket trigger
This commit is contained in:
parent
e3248090da
commit
88757c562b
|
|
@ -188,21 +188,22 @@ public static class RabbitMqManager
|
||||||
|
|
||||||
Db.UpdateInstallationStatus(installationId, receivedStatusMessage.Status);
|
Db.UpdateInstallationStatus(installationId, receivedStatusMessage.Status);
|
||||||
|
|
||||||
const int AlarmStatus = 2;
|
// Automatic ticket creation on error/warning (alarm) state — disabled.
|
||||||
var isSodistore = installation.Product is 2 or 3 or 4 or 5;
|
// const int AlarmStatus = 2;
|
||||||
if (isSodistore
|
// var isSodistore = installation.Product is 2 or 3 or 4 or 5;
|
||||||
&& prevStatus != AlarmStatus
|
// if (isSodistore
|
||||||
&& receivedStatusMessage.Status == AlarmStatus)
|
// && prevStatus != AlarmStatus
|
||||||
{
|
// && receivedStatusMessage.Status == AlarmStatus)
|
||||||
var prev = prevStatus;
|
// {
|
||||||
var alarmsSnapshot = (IReadOnlyList<AlarmOrWarning>)
|
// var prev = prevStatus;
|
||||||
(receivedStatusMessage.Alarms?.ToList() ?? new List<AlarmOrWarning>());
|
// var alarmsSnapshot = (IReadOnlyList<AlarmOrWarning>)
|
||||||
_ = Task.Run(async () =>
|
// (receivedStatusMessage.Alarms?.ToList() ?? new List<AlarmOrWarning>());
|
||||||
{
|
// _ = Task.Run(async () =>
|
||||||
try { await AutoTicketService.MaybeCreateForAlarmAsync(installation, prev, alarmsSnapshot); }
|
// {
|
||||||
catch (Exception ex) { Console.WriteLine($"[AutoTicket] alarm failed for {installationId}: {ex.Message}"); }
|
// try { await AutoTicketService.MaybeCreateForAlarmAsync(installation, prev, alarmsSnapshot); }
|
||||||
});
|
// catch (Exception ex) { Console.WriteLine($"[AutoTicket] alarm failed for {installationId}: {ex.Message}"); }
|
||||||
}
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
//Console.WriteLine("----------------------------------------------");
|
//Console.WriteLine("----------------------------------------------");
|
||||||
//If the status has changed, update all the connected front-ends regarding this installation
|
//If the status has changed, update all the connected front-ends regarding this installation
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue