Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) Add @circuit_breaker decorator #156

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

(WIP) Add @circuit_breaker decorator #156

wants to merge 15 commits into from

Conversation

prkumar
Copy link
Owner

@prkumar prkumar commented Apr 3, 2019

Changes proposed in this pull request:

  • @circuit_breaker decorator: decorating a Consumer subclass with this annotation adds a Circuit Breaker that monitors request(s) and improves the resilience of the client against cascading failures caused by downtime of the consumed service.

@codecov
Copy link

codecov bot commented Apr 3, 2019

Codecov Report

Merging #156 into master will decrease coverage by 13.06%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #156       +/-   ##
===========================================
- Coverage     100%   86.93%   -13.07%     
===========================================
  Files          41       42        +1     
  Lines        2122     2441      +319     
  Branches      167      177       +10     
===========================================
  Hits         2122     2122               
- Misses          0      319      +319
Impacted Files Coverage Δ
uplink/circuit_breaker.py 0% <0%> (ø)

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 b91a561...ac46aed. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 3, 2019

Codecov Report

Merging #156 into master will decrease coverage by 12.92%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #156       +/-   ##
===========================================
- Coverage     100%   87.07%   -12.93%     
===========================================
  Files          41       42        +1     
  Lines        2175     2468      +293     
  Branches      173      182        +9     
===========================================
- Hits         2175     2149       -26     
- Misses          0      319      +319
Impacted Files Coverage Δ
uplink/circuit_breaker.py 0% <0%> (ø)
uplink/arguments.py 100% <0%> (ø) ⬆️
uplink/retry/retry.py 100% <0%> (ø) ⬆️
uplink/ratelimit.py 100% <0%> (ø) ⬆️
uplink/builder.py 100% <0%> (ø) ⬆️
uplink/retry/stop.py 100% <0%> (ø) ⬆️
uplink/commands.py 100% <0%> (ø) ⬆️
uplink/helpers.py 100% <0%> (ø) ⬆️
uplink/converters/marshmallow_.py 100% <0%> (ø) ⬆️

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 fd007f5...c401aeb. Read the comment docs.

@prkumar prkumar added this to the v1.0.0 milestone Apr 5, 2019
@cognifloyd
Copy link
Contributor

I can think of several instances, recently, where a circuit breaker would have been very helpful due to a misbehaving service that was giving itself the DDoS treatment. :p Very Cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants