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

Conversation

dgw
Copy link
Member

@dgw dgw commented Apr 15, 2023

Built on #43, which is the "quick fix" that can be released immediately. Will save this for a future patch release, after much better testing than I can do in one day.

Also reorganizes some error handling. Examining the Tweety code, I found that some cases won't ever happen outside of constructing a new object instance, so those have been encapsulated in a helper.

dgw added 3 commits April 15, 2023 16:10
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.
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.
Examined the Tweety code a bit, found where certain exceptions are
raised and adapted to better catch them.
@dgw dgw added this to the 1.0.2 milestone Apr 15, 2023
@dgw dgw mentioned this pull request May 8, 2023
@dgw
Copy link
Member Author

dgw commented May 18, 2023

I declare #46 the more important update; dropping this back to draft status with no milestone.

@dgw dgw marked this pull request as draft May 18, 2023 04:59
@dgw dgw removed this from the 1.0.2 milestone May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant