streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfranklin <...@git.apache.org>
Subject [GitHub] incubator-streams pull request: Streams 115
Date Mon, 21 Jul 2014 13:58:38 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message