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

    https://github.com/apache/incubator-streams/pull/51#discussion_r15169507
  
    --- Diff: 
streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterErrorHandler.java
 ---
    @@ -42,8 +42,10 @@ public static int handleTwitterError(Twitter twitter, 
Exception exception)
                 {
                     LOGGER.warn("Rate Limit Exceeded");
                     try {
    -                    Thread.sleep(backoff *= 2);
    -                } catch (InterruptedException e1) {}
    +                    Thread.sleep(retry);
    --- End diff --
    
    Are we sure that calls to the twitter API during a backoff period do not 
'reset' the clock?  IE if we make 300 calls in 1 min and need to wait 14 to 
reach the 15 min boundary, would an unsuccessful call at 3 minutes result in 
the window being reset?  
    
    If not, then this approach should work.


---
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