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

Add new event and modify some workflow #2

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

Conversation

pedrommone
Copy link

@pedrommone pedrommone commented Mar 27, 2019

Description

I've added a new event AttemptSucceded and changed the way events are fired.

Now we have two main events:

  • When the service is restored/braked;
  • When the service get an attempt (failed or not).

They are split into four events:

  • AttemptFailed fired by attempt method;
  • AttemptSucceeded fired by attempt method;
  • ServiceFailed fired by attempt method when the previous state is changed;
  • ServiceRestored fired by attempt method when the previous state is changed.

Motivation and context

We need to notify our slack uptime channel when circuit breaker is fired or a service is restored.

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the CONTRIBUTING document.
  • My pull request addresses exactly one patch/feature.
  • I have created a branch for this patch/feature.
  • Each individual commit in the pull request is meaningful.
  • I have added tests to cover my changes.
  • If my change requires a change to the documentation, I have updated it accordingly.

Since the package don't have tests for event firing, I haven't built them.

@pedrommone pedrommone changed the title WIP: Add new event and modify some workflow Add new event and modify some workflow Mar 27, 2019
@pedrommone
Copy link
Author

@francescomalatesta I think this MR should be squashed.

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.

1 participant