streams-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfrank...@apache.org
Subject git commit: Added check to sleep to make sure there is work to be done before waiting to execute
Date Thu, 26 Jun 2014 14:57:28 GMT
Repository: incubator-streams
Updated Branches:
  refs/heads/master 31665bfd3 -> 0705b261d


Added check to sleep to make sure there is work to be done before waiting to execute


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/0705b261
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/0705b261
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/0705b261

Branch: refs/heads/master
Commit: 0705b261dffe64fa6708f000b79e14f878f05229
Parents: 31665bf
Author: mfranklin <mfranklin@apache.org>
Authored: Thu Jun 26 10:57:16 2014 -0400
Committer: mfranklin <mfranklin@apache.org>
Committed: Thu Jun 26 10:57:16 2014 -0400

----------------------------------------------------------------------
 .../apache/streams/sysomos/provider/SysomosHeartbeatStream.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0705b261/streams-contrib/streams-provider-sysomos/src/main/java/org/apache/streams/sysomos/provider/SysomosHeartbeatStream.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-sysomos/src/main/java/org/apache/streams/sysomos/provider/SysomosHeartbeatStream.java
b/streams-contrib/streams-provider-sysomos/src/main/java/org/apache/streams/sysomos/provider/SysomosHeartbeatStream.java
index 5cc993e..6bb30f8 100644
--- a/streams-contrib/streams-provider-sysomos/src/main/java/org/apache/streams/sysomos/provider/SysomosHeartbeatStream.java
+++ b/streams-contrib/streams-provider-sysomos/src/main/java/org/apache/streams/sysomos/provider/SysomosHeartbeatStream.java
@@ -117,6 +117,9 @@ public class SysomosHeartbeatStream implements Runnable {
         } else {
             offsetCount = result.getResponseSize() == 0 ? 0 : offsetCount + 1;
         }
+        if(offsetCount > 0) {
+            sleep();
+        }
     }
 
     protected void sleep() {


Mime
View raw message