Github user smashew commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/19#discussion_r12817778
  
    --- Diff: 
streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
 ---
    @@ -116,10 +116,8 @@ protected void captureTimeline(long currentId) {
                 int keepTrying = 0;
     
                 // keep trying to load, give it 5 attempts.
    -            //while (keepTrying < 10)
    -            while (keepTrying < 1)
    +            while (keepTrying < 5)
    --- End diff --
    
    I mean, it could be user specified, but it is typically better to assume 
that a 'service' could have an issue on first attempt. There are a lot of 
reasons, legitimately that it would fail, including the service being 
unavailable, too many questions being asked by the user, etc. 5 is a pretty 
good default to let the backoff do it's job and wait for the service to become 
available again. 
    
    Personally, I'm not a fan of 'magic numbers' either, but, something > 1 is 
really necessary to be fault tolerant...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to