Merge "ASM #16736 - OHD's RunReportAlarm Service does not notify EDEX's AlarmAlertNotification Observer." into asm_14.4.1
Former-commit-id:a2da3621ee
[formerlya2da3621ee
[formerly fa16cbd1cf7c92545d22b39c1bca597a0959c98c]] Former-commit-id:5ae6e8149e
Former-commit-id:62d5a51b81
This commit is contained in:
commit
41059afb7f
1 changed files with 8 additions and 11 deletions
|
@ -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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue