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

Too many requests when a lot of files are deleted #2

Open
gecube opened this issue Jul 31, 2018 · 0 comments
Open

Too many requests when a lot of files are deleted #2

gecube opened this issue Jul 31, 2018 · 0 comments

Comments

@gecube
Copy link

gecube commented Jul 31, 2018

When cleaning a slack workspace with a lot files I've ran into the next issue:

Exception in thread Thread-17:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/site-packages/wayslack.py", line 237, in _run_thread
    self._func(self._thread_current_item[idx])
  File "/usr/lib/python2.7/site-packages/wayslack.py", line 768, in delete_file
    res = self.slack.files.delete(file_obj["id"])
  File "/usr/lib/python2.7/site-packages/slacker/__init__.py", line 608, in delete
    return self.post('files.delete', data={'file': file_})
  File "/usr/lib/python2.7/site-packages/slacker/__init__.py", line 123, in post
    api, **kwargs
  File "/usr/lib/python2.7/site-packages/slacker/__init__.py", line 95, in _request
    response.raise_for_status()
  File "/usr/lib/python2.7/site-packages/requests/models.py", line 862, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
HTTPError: 429 Client Error: Too Many Requests for url: https://slack.com/api/files.delete?token=

There was a bunch of such messages and there was no way to stop wayslack: it didn't react on Ctrl+C, so I was forced to kill the process.

It happened after "Deleted: 320" message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant