Skip to content

Provides asynchronous event publishing to Wisper using ActiveJob

License

Notifications You must be signed in to change notification settings

ClickMechanic/wisper-activejob

 
 

Repository files navigation

Wisper::ActiveJob

Provides Wisper with asynchronous event publishing using ActiveJob.

Gem Version Code Climate Build Status Coverage Status

Installation

gem 'wisper-activejob'

Usage

publisher.subscribe(MyListener, async: true)

The listener must be a class (or module), not an object. This is because ActiveJob can not reconstruct the state of an object. Whereas a class has no state.

Additionally, you should also ensure that your methods used to handle events under MyListener are all declared as class methods:

class MyListener
  def self.event_name
  end
end

When publishing events the arguments must be simple types as they need to be serialized, or the object must include GlobalID such as ActiveRecord models.

Compatibility

1.9.3+ including JRuby and Rubinius.

See the build status for details.

Contributing

Please send a Pull Request or an Issue to discuss your idea first.

Releasing

  • Bump VERSION
  • Push to master
  • rake build
  • rake release

About

Provides asynchronous event publishing to Wisper using ActiveJob

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 98.2%
  • Shell 1.8%