Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh Tweety instance less often #44

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Refresh Tweety instance less often #44

wants to merge 3 commits into from

Commits on Apr 15, 2023

  1. Construct new Tweety instance for each tweet

    Seems that keeping a Tweety instance around for too long doesn't work.
    It'll eventually start failing to fetch tweets. Probably some secret
    involved that's time-derived.
    
    Not knowing the "safe" time interval to keep using a single Tweety
    instance, I have chosen the nuclear option: No optimization at all.
    dgw committed Apr 15, 2023
    Configuration menu
    Copy the full SHA
    7f893c2 View commit details
    Browse the repository at this point in the history
  2. Refresh Tweety object and retry fetching ONCE if tweet ID is invalid

    Long-lived instances of tweety.bot.Twitter() eventually fail. Refreshing
    the cached instance ONCE will solve this, at the cost of unnecessarily
    refreshing the cached instance if someone posts a private/protected/18+
    tweet link.
    dgw committed Apr 15, 2023
    Configuration menu
    Copy the full SHA
    07d912c View commit details
    Browse the repository at this point in the history
  3. Conditional retry logic feat. a lot of faff over error handling

    Examined the Tweety code a bit, found where certain exceptions are
    raised and adapted to better catch them.
    dgw committed Apr 15, 2023
    Configuration menu
    Copy the full SHA
    c6023c5 View commit details
    Browse the repository at this point in the history