add notification when rate limit reached
This commit is contained in:
parent
6b26940ee9
commit
2f1a34852e
|
@ -79,6 +79,8 @@ def checkToots(timeline, deleted_count=0):
|
||||||
time.sleep(
|
time.sleep(
|
||||||
2
|
2
|
||||||
) # wait 2 secs between deletes to be a bit nicer to the server
|
) # wait 2 secs between deletes to be a bit nicer to the server
|
||||||
|
if mastodon.ratelimit_remaining == 0:
|
||||||
|
print("Rate limit reached. Waiting for a rate limit reset...")
|
||||||
if not options.test:
|
if not options.test:
|
||||||
mastodon.status_delete(toot)
|
mastodon.status_delete(toot)
|
||||||
except MastodonError as e:
|
except MastodonError as e:
|
||||||
|
|
Loading…
Reference in New Issue