Add smart Rate Limiter
Mantenedores costumam responder em até 5 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Funcionalidade
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Estagnada
- Stack de tecnologia
- python
- Domínio
- api, backend-api-design, performance
Direção de pesquisa
Comece pelos handlers de retry integrados síncronos e assíncronos vinculados e, em seguida, compare o guia de rate limit do Java SDK. Mapeie o comportamento solicitado nos clientes de Web API, Webhook, Audit Logs e SCIM. Considera-se concluído quando uma camada de controle de tráfego ativável por opt-in oferece suporte a clientes síncronos e assíncronos, com armazenamento extensível de métricas e sem sleep bloqueante em aplicativos asyncio.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Now that we have a built-in retry handler for rate limited errors in v3.9, retrying a request after getting rate-limited is much easier than before.
- https://github.com/slackapi/python-slack-sdk/releases/tag/v3.9.0
- https://github.com/slackapi/python-slack-sdk/blob/v3.9.1/slack_sdk/http_retry/builtin_handlers.py#L52-L91
- https://github.com/slackapi/python-slack-sdk/blob/v3.9.1/slack_sdk/http_retry/builtin_async_handlers.py#L49-L88
However, getting rate-limited results in a much longer execution time as the whole operation. As a solution for this pain point, we will add a built-in traffic control layer like we do in the Java SDK: https://slack.dev/java-slack-sdk/guides/web-api-basics#rate-limits
A few points to consider for implementing this feature:
- The module manages the amount of requests in the last minute and calculate the interval before the next API call
- Metrics data can be in memory in most use cases but the part should be extensible to switch to other data storage (e.g., Redis)
- As we do in the Java SDK, running the same script/app in multiple hosts should be supported.
- For backward-compatibility, we don't turn the feature on by default. Users can enable it only when they want it.
- Both sync and async API clients should be supported in a proper way (= don't use
time.sleepin asyncio apps) - All API clients (Web API, Audit Logs, SCIM, Webhook) should have the functionality.
Category (place an x in each of the [ ])
- slack_sdk.web.WebClient (sync/async) (Web API client)
- slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
- slack_sdk.models (UI component builders)
- slack_sdk.oauth (OAuth Flow Utilities)
- slack_sdk.socket_mode (Socket Mode client)
- slack_sdk.audit_logs (Audit Logs API client)
- slack_sdk.scim (SCIM API client)
- slack_sdk.rtm (RTM client)
- slack_sdk.signature (Request Signature Verifier)
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
- Linguagem predominante
- Python
- Estrelas
- 4k
- Forks
- 861
- Merge médio
- 3d 17h
- PRs com merge (30d)
- 10
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de slackapi/python-slack-sdk
-
Missing method from SDK // admin.users.getExpirationTalvez já em andamento @srtaalej assumiu há 2 dias. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
slackapi/python-slack-sdk#1982 · 1 comentário ·
Mantenedores costumam responder em até 5 dias
-
auto-triage-stale needs info server-side-issue
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
slackapi/python-slack-sdk#1961 · 4 comentários ·
Mantenedores costumam responder em até 5 dias
-
auto-triage-skip discussion
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
slackapi/python-slack-sdk#1940 · 2 comentários ·
Mantenedores costumam responder em até 5 dias
-
chat_postMessage silently forwards thread_id to the API, so a threaded reply posts to the channelAbertaauto-triage-skip enhancement
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
slackapi/python-slack-sdk#1923 · 2 comentários ·
Mantenedores costumam responder em até 5 dias
-
files_upload_v2 should respect the retry handlersTalvez já em andamento @DSeaStar assumiu há 58 dias. Abertaauto-triage-skip bug python web-client
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
slackapi/python-slack-sdk#1853 · 2 comentários ·
Mantenedores costumam responder em até 5 dias
Todas as issues de slackapi/python-slack-sdk
Issues semelhantes
-
comp/gateway comp/plugins duplicate P3 type/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
NousResearch/hermes-agent#137019 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
bot-triaged module: docs triaged
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
new-entry
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
BinWang28/audio-ai-hub#194 ·
-
confluence: a paged listing's links re-encode a parameter they carry, where real carries it as sentAbertafidelity
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 63/100
Mantenedores costumam responder em até 1 dia