Skip to content

Configure fail safe mechanism #93

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

Closed
wants to merge 6 commits into from
Closed

Conversation

lewispb
Copy link
Contributor

@lewispb lewispb commented Jul 1, 2022

WIP

Adds a fail safe configuration mechanism

lewispb added 4 commits July 1, 2022 09:42
Makes the fail safe mechanism optional. When fail safe is disabled,
errors will be raised as per usual.
* main:
  Coalesce "current pipeline or redis" into the redis method itself
  Pefer a thread_mattr_accessor over a thread local variable
  Delete list of keys in batch (rails#90)
  Use a thread-local variable for pipeline
  Revert "Use block parameter to pipeline in Redis#multi (rails#68)"
  Resolve pipelining deprecation warnings
end

def failsafe
yield
def failsafe(returning: nil, &block)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about changing failsafe(returning: nil, &block) API to failsafe(returning: nil, errors: [Redis::BaseError], &block) such that we make explicit which errors we catch?

@lewispb
Copy link
Contributor Author

lewispb commented Jul 11, 2022

Closing in favor of #94

@lewispb lewispb closed this Jul 11, 2022
@lewispb lewispb deleted the disable-failover branch July 11, 2022 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants