kfei / slack-cleaner

:speech_balloon: Bulk delete messages and files on Slack
MIT License
1.24k stars 144 forks source link

need time delay between each delete call #82

Closed yuvarajancitspl closed 4 years ago

yuvarajancitspl commented 5 years ago

https://github.com/kfei/slack-cleaner/blob/11686f8b2d9d0f3e6a48ccf8c1fa3daf7a0af62e/slack_cleaner/cli.py#L141

need to add sleep of 1.5 seconds between each delete call, so we can avoid rate limit error. As delete API call belongs to tier3, it allows only 50+ API call per minute.

ventz commented 4 years ago

Thanks! This fixed the problem.

Added a ~2~ 1 second delay, and the yellow "Failed to delete ->" went away.

kathibeepboop commented 4 years ago

Just use the parameter "--rate [seconds]"

ventz commented 4 years ago

Thanks. Saw this too as I started poking at the code.

kathibeepboop commented 4 years ago

Same on my side ;D But when youŕe done, feel free to close the issue!

yuvarajancitspl commented 4 years ago

as @MKHSKY mentioned, time.sleep functionality is already available as parameter "--rate [secod]", so am closing this issue.