New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sneakers_requeue_on_error

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sneakers_requeue_on_error

  • 0.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

sneakers_requeue_on_error

A Sneakers worker handler that will re-queue the message when encountering an error.

Installation

Add this line to your application's Gemfile:

gem 'sneakers_requeue_on_error'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install sneakers_requeue_on_error

Usage

Given a Sneakers worker:

class MyWorker
  include Sneakers::Worker
  
  from_queue :a_queue,
             handler: SneakersRequeueOnError::Handler,
             prefetch: 10,

  def work(message)
    # Do something worthwhile
    ack!
  end
end

Set the handler to be SneakersRequeueOnError::Handler.

From now on, if the work method encounters an error, the message will be place back on the queue.

Note that Sneakers has built in error handling around the work method, so you shouldn't attempt to catch any errors via rescue unless you want to bypass the error handling altogether.

Development

To contribute to this gem, simple clone the repository, run bundle install and run tests:

    bundle exec rspec
    bundle exec rubocop

Releasing

The release process is tied to the git tags. Simply creating a new tag and pushing will trigger a new release to rubygems.

FAQs

Package last updated on 02 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc