You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by mf...@apache.org on 2014/05/27 16:00:58 UTC
[2/5] git commit: STREAMS-87 | Added comment detailing thoughts about
why '5' was chosen for the number of retry attempts
STREAMS-87 | Added comment detailing thoughts about why '5' was chosen for the number of retry attempts
Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/ce531ba7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/ce531ba7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/ce531ba7
Branch: refs/heads/master
Commit: ce531ba791fb55d107950526ad8efceda274693c
Parents: a84ec40
Author: Robert Douglas <rd...@w2odigital.com>
Authored: Thu May 22 15:54:42 2014 -0500
Committer: Robert Douglas <rd...@w2odigital.com>
Committed: Thu May 22 15:54:42 2014 -0500
----------------------------------------------------------------------
.../apache/streams/twitter/provider/TwitterTimelineProvider.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce531ba7/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
index 4e9b58d..49a2d39 100644
--- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
+++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
@@ -116,6 +116,9 @@ public class TwitterTimelineProvider implements StreamsProvider, Serializable {
int keepTrying = 0;
// keep trying to load, give it 5 attempts.
+ //This value was chosen because it seemed like a reasonable number of times
+ //to retry capturing a timeline given the sorts of errors that could potentially
+ //occur (network timeout/interruption, faulty client, etc.)
while (keepTrying < 5)
{
try