You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by be...@apache.org on 2017/08/14 17:19:27 UTC

[incubator-openwhisk-package-alarms] branch master updated: DB view should filter out disabled triggers (#84)

This is an automated email from the ASF dual-hosted git repository.

berstler 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 1450692  DB view should filter out disabled triggers (#84)
1450692 is described below

commit 14506927ce8a6b610a6cf7873622d597e59dc460
Author: Jason Peterson <ja...@us.ibm.com>
AuthorDate: Mon Aug 14 13:19:25 2017 -0400

    DB view should filter out disabled triggers (#84)
---
 provider/app.js       | 2 +-
 provider/lib/utils.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/provider/app.js b/provider/app.js
index 2746a54..3d90fd3 100755
--- a/provider/app.js
+++ b/provider/app.js
@@ -63,7 +63,7 @@ function createDatabase() {
                     views: {
                         triggers_by_worker: {
                             map: function (doc) {
-                                if (doc.maxTriggers) {
+                                if (doc.maxTriggers && (!doc.status || doc.status.active === true)) {
                                     emit(doc.worker || 'worker0', 1);
                                 }
                             }.toString(),
diff --git a/provider/lib/utils.js b/provider/lib/utils.js
index 02b3718..25935d0 100644
--- a/provider/lib/utils.js
+++ b/provider/lib/utils.js
@@ -225,7 +225,7 @@ module.exports = function(
                     var triggerIdentifier = trigger.id;
                     var doc = trigger.doc;
 
-                    if ((!doc.status || doc.status.active === true) && !(triggerIdentifier in utils.triggers)) {
+                    if (!(triggerIdentifier in utils.triggers)) {
                         //check if trigger still exists in whisk db
                         var namespace = doc.namespace;
                         var name = doc.name;

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].