From 5156ea58ac1c834f14986b3c54682bb49c8616d7 Mon Sep 17 00:00:00 2001 From: Guilherme Jansen Date: Fri, 21 Mar 2025 14:42:28 -0300 Subject: [PATCH] =?UTF-8?q?feat(env):=20adicionar=20vari=C3=A1veis=20de=20?= =?UTF-8?q?ambiente=20para=20webhook?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adiciona novas variáveis para controlar o comportamento dos webhooks: - WEBHOOK_REQUEST_TIMEOUT_MS: tempo máximo de espera - WEBHOOK_RETRY_MAX_ATTEMPTS: número máximo de tentativas - WEBHOOK_RETRY_INITIAL_DELAY_SECONDS: intervalo inicial - WEBHOOK_RETRY_USE_EXPONENTIAL_BACKOFF: ativar backoff exponencial - WEBHOOK_RETRY_MAX_DELAY_SECONDS: intervalo máximo entre tentativas - WEBHOOK_RETRY_JITTER_FACTOR: fator de aleatoriedade - WEBHOOK_RETRY_NON_RETRYABLE_STATUS_CODES: códigos de erro permanentes Issue: #1325 --- .env.example | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.env.example b/.env.example index 02eca612..42547ffc 100644 --- a/.env.example +++ b/.env.example @@ -173,6 +173,16 @@ WEBHOOK_EVENTS_TYPEBOT_CHANGE_STATUS=false WEBHOOK_EVENTS_ERRORS=false WEBHOOK_EVENTS_ERRORS_WEBHOOK= +# Webhook timeout and retry configuration +WEBHOOK_REQUEST_TIMEOUT_MS=60000 +WEBHOOK_RETRY_MAX_ATTEMPTS=10 +WEBHOOK_RETRY_INITIAL_DELAY_SECONDS=5 +WEBHOOK_RETRY_USE_EXPONENTIAL_BACKOFF=true +WEBHOOK_RETRY_MAX_DELAY_SECONDS=300 +WEBHOOK_RETRY_JITTER_FACTOR=0.2 +# Comma separated list of HTTP status codes that should not trigger retries +WEBHOOK_RETRY_NON_RETRYABLE_STATUS_CODES=400,401,403,404,422 + # Name that will be displayed on smartphone connection CONFIG_SESSION_PHONE_CLIENT=Evolution API # Browser Name = Chrome | Firefox | Edge | Opera | Safari