joaquinlpereyra / twitterImgBot

Ever wanted to randomly tweet pictures from a folder? No? Well, maybe you do now.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bot should work even if executed less than once every 5 minutes

joaquinlpereyra opened this issue · comments

That.

The problem would be in the hardcoded 5 minutes limits found in some functions on some functions in the /bot/requests.py.

Fixing it should be quite easy. The thing is deciding when a request is too old to be even considered. Maybe adding a setting to load how often the bot executes, then deciding a request is too old if interval_between_execution*2 has passed?

The *2 is there because twitter search sometimes takes a while showing new tweets, so it's better to be safe than sorry and be sure to not miss any potential requests.