Skip to content

Martin91/wisper-sidekiq

 
 

Repository files navigation

Wisper::Sidekiq

Provides Wisper with asynchronous event publishing using Sidekiq.

Gem Version Code Climate Build Status Coverage Status

Installation

gem 'wisper-sidekiq'

Usage

publisher.subscribe(MyListener, async: true)

The listener must be a class (or module), not an object. This is because Sidekiq can not reconstruct the state of an object. However a class is easily reconstructed.

When publshing events the arguments must be simple as they need to be serialized. For example instead of sending an ActiveRecord model as an argument use its id instead.

See the Sidekiq best practices for more information.

Compatibility

The same Ruby versions as Sidekiq are offically supported, but it should work with any 2.x syntax Ruby including JRuby and Rubinius.

See the build status for details.

Contributing

To run sidekiq use scripts/sidekiq. This wraps sidekiq in rerun which will restart sidekiq when specs/dummy_app changes.

About

Asynchronous event publishing for Wisper using Sidekiq

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 96.0%
  • Shell 4.0%