#15 Set reload time automatically based on twitter's limits

Tom Parker

Twitter provides information (http://twitter.com/account/rate_limit_status.xml) about the allowed rate limits. This patch adds an "automatically" option to the refresh interval, which sets the interval to 2/3rds (to try and avoid accidentally hitting the limits) of whatever Twitter says is ok (typically 100 updates/hour).


  • Tom Parker

    Tom Parker - 2009-02-06

    I've just uploaded a v2 edition of the patch that instead of feeding off of the hourly limit (which will fail badly if you've got other tools also accessing Twitter at a fast rate) and instead looks at the requests remaining for this hour and the time till next reset in order to determine a sane rate to refresh at. For users who aren't accessing Twitter with anything else, this should behave as the previous patch, but will interact sanely with other programs if needed. The "I've run out of requests" support is still untested, but should be ok...

  • Brian Pepple

    Brian Pepple - 2009-02-07

    Thanks for the patch! I'll try to review it later this weekend.

  • Brian Pepple

    Brian Pepple - 2009-02-07
    • assigned_to: nobody --> bpepple
  • Brian Pepple

    Brian Pepple - 2009-02-12

    Still reviewing this patch. I've had a few crashes over the weekend due to a thread issue, and need to see if I can track down what's causing it. Hopefully, I'll have some time to do that this weekend. ;)

  • Tom Parker

    Tom Parker - 2009-02-12

    I've been running with this patch (plus a couple of others I've recently submitted) on the SVN trunk for the past week, and haven't seen any issues yet.

  • Brian Pepple

    Brian Pepple - 2009-02-12

    Yeah, I've been able to reproduce this bug, so I'm going to need to do some investigation first before committing this. How long are your running each instance? I'm able to reliably recreate this crash with a bit over an hours worth of running.

    Parser: Remaining limit is 58, speed is 0.038284, seconds is 1515, hourly limit is 137.821782
    Network: Auto reloading. Timeout: 4218
    Network: Get: https://twitter.com/statuses/friends_timeline.xml
    Network: Timeline response: 200
    Network: Get: https://twitter.com/account/rate_limit_status.xml
    Network: Limit is 91, reload time is 39560
    Network: Starting timeout id: 4247
    Network: Parsing timeline
    E: thread-posix.c: Assertion 'pthread_setspecific(t->key, userdata) == 0' failed at pulsecore/thread-posix.c:200, function pa_tls_set(). Aborting.

  • Tom Parker

    Tom Parker - 2009-02-13

    I've been running it pretty much 24/7 (machine it's on gets left on overnight), and haven't seen *any* crashes. Can you get a full ("thread apply all bt" to gdb) stacktrace? I might be able to do something with that (I do various bug triage and fixing for the Gnome project :-)


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks