Skip to content

Detect non-atomic interactions within DB transactions

License

Notifications You must be signed in to change notification settings

alexshagov/isolator

 
 

Repository files navigation

Gem Version Build Status

Isolator

Detect non-atomic interactions within DB transactions.

Examples:

# HTTP calls within transaction
User.transaction do
  user = User.new(user_params)
  user.save!
  # HTTP API call
  PaymentsService.charge!(user)
end

#=> raises Isolator::HTTPError

# background job
User.transaction do
  user.update!(confirmed_at: Time.now)
  UserMailer.successful_confirmation(user).deliver_later
end

#=> raises Isolator::BackgroundJobError

Installation

Add this line to your application's Gemfile:

group :development, :test do
  gem "isolator"
end

Usage

TBD

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/palkan/isolator.

License

The gem is available as open source under the terms of the MIT License.

About

Detect non-atomic interactions within DB transactions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 99.4%
  • Shell 0.6%