- Go back to Celluloid
0.15.2
since it's not production ready
- Update to use Celluloid
0.16
- Delegate to Celluloid's exception handler
- Move
to_prepare
callback in Railtie out of initializer
- Fix superclass for
testing/inline
module
- Track instantiated queues through Celluloid registry
- Clear Celluloid registry on every Rails request in Development
- Update Celluloid dependency to 0.15.1
- Fix how workers are defined on the Job so that jobs can be safely subclassed
- Constrain workers when creating a queue to raise more helpful exceptions
- Add
workers
method to job to specify number of Celluloid pool workers
- Removed the need for a configuration initializer
- include
SuckerPunch::Job
instead ofSuckerPunch::Worker
- Use standard Ruby job class instantiation to perform a job (ie. LogJob.new.async.perform)
- Add
SuckerPunch.logger
- Add
SuckerPunch.logger=
- Set SuckerPunch logger to Rails.logger within a Rails application
SuckerPunch::Queue#size
now returns the number of messages enqueuedSuckerPunch::Queue#workers
now returns the number of workers in the queue- Update Celluloid dependency
- Remove
size
option when defining a queue, preferworkers
- Update Celluloid dependency
- Prefer
workers
stat method oversize
- Update config to use
workers
instead ofsize
old config:
# config/initializers/sucker_punch.rb
SuckerPunch.config do
queue name: :log_queue, worker: LogWorker, size: 10
end
new config:
# config/initializers/sucker_punch.rb
SuckerPunch.config do
queue name: :log_queue, worker: LogWorker, workers: 10
end
- Add testing library to stub out workers (see testing section in README)
- Fix location of inline testing library
spec/spec_helper.rb
require 'sucker_punch/testing/inline'
SuckerPunch::Queue[:log_queue].async.perform("login") # => SYNCHRONOUS
- Now includes a testing library that will run all jobs synchronously.
spec/spec_helper.rb
require 'sucker_punch/testing'
SuckerPunch::Queue[:log_queue].async.perform("login") # => SYNCHRONOUS