LearnersGuild / echo

learning management system
MIT License
3 stars 31 forks source link

Slack cache refresh too inefficient #1078

Closed heyheyjp closed 6 years ago

heyheyjp commented 7 years ago

When a slack cache miss occurs, an entire set of users or channels is refreshed. So if you attempt to operations on a collection of users or channels at once (and there are multiple misses) there will be multiple attempts to retrieve entire sets of users or channels. In some cases, this causes the system to exceed the rate limit for Slack API calls.


APIError: API Error 429 (Too Many Requests) trying to invoke API (url = 'https://slack.com/api/users.list?token=xoxp-135758843363-169551488658-169551937890-6141fd640f3a3ee39e1d1ee8909c557c')
screen shot 2017-08-28 at 12 30 45 pm

https://sentry.io/learners-guild/game/issues/327130181/