louisgrasset / touitomamout

Touitomamout is an easy way to synchronize your Twitter's tweets 🦤 to Mastodon 🦣 and Bluesky post ☁️ (also known as Twitter to Mastodon & Bluesky crossposter)
https://hub.docker.com/r/louisgrasset/touitomamout
GNU Affero General Public License v3.0
200 stars 11 forks source link

feat: add rate limit detection #30

Closed louisgrasset closed 1 year ago

louisgrasset commented 1 year ago

It's been a few weeks the sync can take a few minutes because of the twitter api rate limit. Instead of making the sync lasts for a too long time, this MR implements rate limit detection.

A tweet has 60 seconds to get fetched. Timeout is reset at each new successful fetch. After a failure, the sync stops getting new tweets & continues to the next steps