usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [1/2] usergrid git commit: change queue impl
Date Fri, 16 Oct 2015 21:51:07 GMT
Repository: usergrid
Updated Branches:
  refs/heads/remove-inmemory-event-service 4992f5cab -> e5e9d021b


change queue impl


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/6a3bae15
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/6a3bae15
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/6a3bae15

Branch: refs/heads/remove-inmemory-event-service
Commit: 6a3bae15a3f441e5861f81f6002f474df0e17dae
Parents: 4992f5c
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Fri Oct 16 15:39:22 2015 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Fri Oct 16 15:39:22 2015 -0600

----------------------------------------------------------------------
 .../apache/usergrid/persistence/queue/DefaultQueueManager.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/6a3bae15/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/DefaultQueueManager.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/DefaultQueueManager.java
b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/DefaultQueueManager.java
index a6bc8cf..3b6fe07 100644
--- a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/DefaultQueueManager.java
+++ b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/DefaultQueueManager.java
@@ -43,13 +43,13 @@ public class DefaultQueueManager implements QueueManager {
         List<QueueMessage> returnQueue = new ArrayList<>();
         try {
             QueueMessage message=null;
-            int count = 10;
+            int count = 5;
             do {
                 message = queue.poll(100, TimeUnit.MILLISECONDS);
                 if (message != null) {
                     returnQueue.add(message);
                 }
-            }while(queue.size()>0 && count-->0);
+            }while(message!=null && count-->0);
         }catch (InterruptedException ie){
             throw new RuntimeException(ie);
         }


Mime
View raw message