ASM #16736 - OHD's RunReportAlarm Service does not notify EDEX's AlarmAlertNotification Observer.

Change-Id: Ib5c6bb89c57022b61260adbaa08760e5df05ad61

Former-commit-id: 4a58408889 [formerly ea046bedd3] [formerly 4a58408889 [formerly ea046bedd3] [formerly 9ffad49fa0 [formerly 20efa852dcc64c80890abed6b2882a205b37cf43]]]
Former-commit-id: 9ffad49fa0
Former-commit-id: 44fc2719c8 [formerly b490bf66ea]
Former-commit-id: 5d7f55047e
This commit is contained in:
Michael Gamazaychikov 2015-02-10 14:46:10 -05:00
parent dd091f8122
commit 5fa796f77e

View file

@ -150,19 +150,16 @@ public final class RunReportAlarmSrv {
private static void saveProductToTextDb(final String productText,
final String productId) throws Exception {
TextDB textdb = new TextDB();
long statusCode = textdb.writeProduct(productId, productText, true,
long insertTime = textdb.writeProduct(productId, productText, true,
null);
// Set the current time and send product alarm alert.
Date d = new Date(System.currentTimeMillis());
d.setTime(statusCode);
AlarmAlertUtil.sendProductAlarmAlert(productId,
String.valueOf(d.getTime()),
true);
if (statusCode != Long.MIN_VALUE) {
statusHandler.info("Product successfully sent");
if (insertTime != Long.MIN_VALUE) {
// Set the write time and send product alarm alert.
Date d = new Date();
d.setTime(insertTime);
AlarmAlertUtil.sendProductAlarmAlert(productId, d, true);
statusHandler.info("Saved product to textdb successfully.");
} else {
statusHandler.error("Product send error detected.");
statusHandler.error("Error detected saving product to textdb.");
}
}
}