poppyred / python-consul2

Python client for the Consul HTTP API ,Continue develop on cablehead/python-consul
https://python-consul2.readthedocs.io/
MIT License
130 stars 28 forks source link

Support Consul response code: 429 #24

Open kkzo opened 3 years ago

kkzo commented 3 years ago

Consul returns a 429 response code when: Some healthchecks are passing, at least one is warning (see https://www.consul.io/api-docs/agent/service).

This PR updates the callback handler to support response code 429.

poppyred commented 3 years ago

22 will drop support v3.5,please fetch and merge new commit drop support v3.5

codecov[bot] commented 3 years ago

Codecov Report

Merging #24 (2b6fb25) into master (7aa1ff4) will decrease coverage by 0.09%. The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #24      +/-   ##
==========================================
- Coverage   94.45%   94.36%   -0.10%     
==========================================
  Files           6        6              
  Lines        1840     1845       +5     
==========================================
+ Hits         1738     1741       +3     
- Misses        102      104       +2     
Flag Coverage Δ
unittests 94.36% <66.66%> (-0.10%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
consul/base.py 93.68% <66.66%> (-0.11%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7aa1ff4...2b6fb25. Read the comment docs.

markblackman commented 3 years ago

please merge as soon as convenient. If you do any kind of cluster monitoring with this package, the 429 response is a very common case.