Skip to content

Reduce Sleep Time "Padding" from binder.py #1049

Description

@pushshift
time.sleep(sleep_time + 5)  # sleep for few extra sec

There is no real reason to have the +5 extra seconds for sleep time. Based on Twitter headers for rate limit reset purposes, a value of +1 would be sufficient to cover any "fuzzyness" between clocks. If this is set to account for server clock drift, it really should be on the sysadmin to correct this.

The extra 4 seconds of waiting can add up for long running search jobs ingesting a lot of tweets were every active second counts. That's over 6 minutes of wasted idle time per 24 hour period.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ImprovementThis is regarding an improvement to an existing feature

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions