You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by du...@apache.org on 2018/03/05 23:59:28 UTC
[incubator-openwhisk-package-alarms] branch master updated: only
update monitor status for the current monitored trigger (#135)
This is an automated email from the ASF dual-hosted git repository.
dubeejw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-package-alarms.git
The following commit(s) were added to refs/heads/master by this push:
new b796607 only update monitor status for the current monitored trigger (#135)
b796607 is described below
commit b7966075b4b565d1c4f856da9ba94745c3388b18
Author: Jason Peterson <ja...@us.ibm.com>
AuthorDate: Mon Mar 5 18:59:27 2018 -0500
only update monitor status for the current monitored trigger (#135)
---
provider/lib/utils.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/provider/lib/utils.js b/provider/lib/utils.js
index 3200189..75125d8 100644
--- a/provider/lib/utils.js
+++ b/provider/lib/utils.js
@@ -164,7 +164,7 @@ module.exports = function(logger, triggerDB, redisClient) {
this.handleFiredTrigger = function(dataTrigger, isMonitorTrigger) {
var method = 'handleFiredTrigger';
- if (isMonitorTrigger) {
+ if (isMonitorTrigger && utils.monitorStatus.triggerName === dataTrigger.name) {
utils.monitorStatus.triggerFired = "success";
}
@@ -344,7 +344,7 @@ module.exports = function(logger, triggerDB, redisClient) {
if (utils.triggers[triggerIdentifier]) {
if (doc.status && doc.status.active === false) {
utils.stopTrigger(triggerIdentifier);
- if (doc.monitor && doc.monitor === utils.host) {
+ if (doc.monitor && doc.monitor === utils.host && utils.monitorStatus.triggerName === doc.name) {
utils.monitorStatus.triggerStopped = "success";
}
}
@@ -357,7 +357,7 @@ module.exports = function(logger, triggerDB, redisClient) {
utils.triggers[triggerIdentifier] = cachedTrigger;
logger.info(method, triggerIdentifier, 'created successfully');
- if (doc.monitor && doc.monitor === utils.host) {
+ if (doc.monitor && doc.monitor === utils.host && utils.monitorStatus.triggerName === cachedTrigger.name) {
utils.monitorStatus.triggerStarted = "success";
}
--
To stop receiving notification emails like this one, please contact
dubeejw@apache.org.