Skip to content

Commit

Permalink
Closes-Bug: #1535198 - After the alarms were acknowledged a call to g…
Browse files Browse the repository at this point in the history
…et the

alarms were still showing unacked. Analytics is taking time to update the
status. So added a timeout of 2 secs in our api code to wait and refresh so that
the status is updated.

Change-Id: I6b1150678dc84f247e66ba29d775311816ad564a
  • Loading branch information
manojgn committed Jan 25, 2016
1 parent 6b03717 commit e49418d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/serverroot/common/alarms.api.js
Expand Up @@ -48,7 +48,6 @@ function ackAlarms(req, res, appData)
var alarmsLength = alarms.length;
var reqUrl = '/analytics/alarms/acknowledge';
var dataObjArr = [];
console.log('inside ack');

for(i = 0; i < alarmsLength; i++) {
commonUtils.createReqObj(dataObjArr, reqUrl, global.HTTP_REQUEST_POST,
Expand All @@ -64,7 +63,10 @@ function ackAlarms(req, res, appData)
commonUtils.handleJSONResponse(error, res, null);
return;
}
commonUtils.handleJSONResponse(error, res, results);
//Adding a timeout since analytics is taking time to acknowledge
setTimeout(function() {
commonUtils.handleJSONResponse(error, res, results);
}, 2000);
}
);
} else {
Expand Down

0 comments on commit e49418d

Please sign in to comment.