feat(int-evolution-go): retry pattern with backoff/jitter + API fixes#85
Open
mt-alarcon wants to merge 1 commit into
Open
Conversation
…didate) - Add _retry_http_call_client(): exponential backoff + jitter (3 attempts) Retries on HTTP 5xx / URLError / socket.timeout; raises immediately on 4xx - Refactor api_request() to use _retry_http_call_client + EVOLUTION_GO_INSTANCE_TOKEN for /send/* endpoints; centralize error handling in main() - Add User-Agent header to all requests - Fix cmd_connect: webhook→webhookUrl, subscribe→events (Evolution Go API) - Fix cmd_send_media: mediaUrl/mediatype→url/type (Evolution Go API) - Fix cmd_set_proxy: require explicit args instead of Webshare auto-config - Remove Webshare-specific code (get_webshare_config, --no-proxy flag, auto-proxy in create_instance): moved to customizations/skills/int-evolution-go-mta/ Webshare integration is MTA-only and lives in the custom skill. This file is now upstream-clean and suitable for a PR to evolution-foundation/evo-nexus. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Sorry @mt-alarcon, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
evolution_go_client.pymain()webhookUrl,events,url/type)EVOLUTION_GO_INSTANCE_TOKENenv var supportWhy
Improves reliability when interacting with the Evolution Go API by retrying transient failures with exponential backoff and jitter. Pre-existing field naming inconsistencies were silently failing — fix aligns with current API contract.
Test plan
python3 evolution_go_client.py --helpreturns 18 subcommands (no broken imports)python3 -m py_compile evolution_go_client.pygrep webshare= 0 in changed file)Breaking changes
None.
🤖 Generated with Claude Code