You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/08/07 18:51:21 UTC

[GitHub] csantanapr commented on a change in pull request #82: Applying filter on all db changes since 0 takes too long

csantanapr commented on a change in pull request #82: Applying filter on all db changes since 0 takes too long
URL: https://github.com/apache/incubator-openwhisk-package-alarms/pull/82#discussion_r131732914
 
 

 ##########
 File path: provider/lib/utils.js
 ##########
 @@ -216,25 +210,26 @@ module.exports = function(
     this.initAllTriggers = function() {
         var method = 'initAllTriggers';
 
-        logger.info(method, 'resetting system from last state');
+        //follow the trigger DB
+        utils.setupFollow('now');
 
-        triggerDB.changes({ since: 0, include_docs: true, filter: ddname + '/' + filter, worker: utils.worker }, (err, changes) => {
+        logger.info(method, 'resetting system from last state');
+        triggerDB.view(viewDDName, triggersByWorker, {reduce: false, include_docs: true}, function(err, body) {
 
 Review comment:
   use `key:"worker0"` that will reduce the docs you get back only for the current worker
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services