You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2014/10/21 21:59:20 UTC
[1/2] git commit: fixing query to send to all
Repository: incubator-usergrid
Updated Branches:
refs/heads/two-dot-o 926ae56f5 -> dcf97c40c
fixing query to send to all
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/f9cc232e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/f9cc232e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/f9cc232e
Branch: refs/heads/two-dot-o
Commit: f9cc232e46034c9f1742493ca32e0372c4f97a52
Parents: 926ae56
Author: Shawn Feldman <sf...@apache.org>
Authored: Tue Oct 21 13:57:13 2014 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Tue Oct 21 13:57:13 2014 -0600
----------------------------------------------------------------------
.../usergrid/services/notifications/NotificationsService.java | 4 ++--
.../apache/usergrid/services/notifications/TaskManager.java | 7 +++++--
2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f9cc232e/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java b/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java
index f98ebfc..4a6e067 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java
@@ -176,9 +176,9 @@ public class NotificationsService extends AbstractCollectionService {
org.apache.usergrid.persistence.index.query.Query query = sp.getQuery();
if (query == null) {
query = new Query();
- if(!sp.isName() ||
- (collection == "devices" && sp.isName() && !sp.getName().equals("notifications"))) {
+ if(collection == "devices" && sp.isName() && !sp.getName().equals("notifications")) {
//look for queries to /devices;ql=/notifications
+ }else{
query.addIdentifier(sp.getIdentifier());
}
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f9cc232e/stack/services/src/main/java/org/apache/usergrid/services/notifications/TaskManager.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/notifications/TaskManager.java b/stack/services/src/main/java/org/apache/usergrid/services/notifications/TaskManager.java
index 03f036d..5902a93 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/notifications/TaskManager.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/notifications/TaskManager.java
@@ -162,7 +162,6 @@ public class TaskManager {
// refresh notification
if (fetch)
notification = em.get(this.notification.getUuid(), Notification.class);
- notification.setModified(System.currentTimeMillis());
//and write them out again, this will produce the most accurate count
Map<String, Long> stats = new HashMap<>(2);
@@ -172,13 +171,17 @@ public class TaskManager {
long totals = (notification.getStatistics().get("sent") + notification.getStatistics().get("errors"));
//none of this is known and should you ever do this
- Map<String, Object> properties = new HashMap<>();
+ notification.setModified(System.currentTimeMillis());
notification.setFinished(notification.getModified());
+
+ Map<String, Object> properties = new HashMap<>();
properties.put("finished", notification.getModified());
properties.put("state", notification.getState());
notification.addProperties(properties);
+
long latency = notification.getFinished() - notification.getStarted();
LOG.info("notification finished batch: {} of {} devices in " + latency + "ms", notification.getUuid(), totals);
+
em.update(notification);
// Set<Notifier> notifiers = new HashSet<>(proxy.getNotifierMap().values()); // remove dups
// proxy.asyncCheckForInactiveDevices(notifiers);
[2/2] git commit: fix send to all parameter
Posted by sf...@apache.org.
fix send to all parameter
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/dcf97c40
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/dcf97c40
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/dcf97c40
Branch: refs/heads/two-dot-o
Commit: dcf97c40cbace248dae6dbd01531356b72855165
Parents: f9cc232
Author: Shawn Feldman <sf...@apache.org>
Authored: Tue Oct 21 13:59:00 2014 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Tue Oct 21 13:59:00 2014 -0600
----------------------------------------------------------------------
.../usergrid/services/notifications/NotificationsService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/dcf97c40/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java b/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java
index 4a6e067..3617fda 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java
@@ -176,7 +176,7 @@ public class NotificationsService extends AbstractCollectionService {
org.apache.usergrid.persistence.index.query.Query query = sp.getQuery();
if (query == null) {
query = new Query();
- if(collection == "devices" && sp.isName() && !sp.getName().equals("notifications")) {
+ if(collection == "devices" && sp.isName() && sp.getName().equals("notifications")) {
//look for queries to /devices;ql=/notifications
}else{
query.addIdentifier(sp.getIdentifier());