Skip to content

Instantly share code, notes, and snippets.

@sithu
Created October 26, 2016 21:10
Show Gist options
  • Save sithu/d23d354d21ca5d6273c5a6f934b7d8c3 to your computer and use it in GitHub Desktop.
Save sithu/d23d354d21ca5d6273c5a6f934b7d8c3 to your computer and use it in GitHub Desktop.
CB Demo
$ python cbdemo.py
Call-1:
Result=SUCCESS
Call-2:
Result=SUCCESS
Call-3:
Threw Dependency Exception
Call-4:
Threw Dependency Exception
Call-5:
Threw Dependency Exception
Call-6:
CircuitBreaker[dependency_call] is OPEN until 2016-10-26 21:08:47.273595 (3 failures, 2 sec remaining)
Call-7:
CircuitBreaker[dependency_call] is OPEN until 2016-10-26 21:08:47.273595 (3 failures, 2 sec remaining)
Call-8:
CircuitBreaker[dependency_call] is OPEN until 2016-10-26 21:08:47.273595 (3 failures, 1 sec remaining)
Call-9:
CircuitBreaker[dependency_call] is OPEN until 2016-10-26 21:08:47.273595 (3 failures, 1 sec remaining)
Call-10:
CircuitBreaker[dependency_call] is OPEN until 2016-10-26 21:08:47.273595 (3 failures, 0 sec remaining)
Call-11:
Result=SUCCESS
Call-12:
Result=SUCCESS
Call-13:
Result=SUCCESS
Call-14:
Result=SUCCESS
Call-15:
Result=SUCCESS
Call-16:
Result=SUCCESS
Call-17:
Threw Dependency Exception
Call-18:
Result=SUCCESS
Call-19:
Threw Dependency Exception
Call-20:
Result=SUCCESS
num_success=10, num_failure=10, num_circuitbreaker_passthrough_failure=5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment