- Don't consider global shutdown bool when exhausting the queue during
shutdown. This led to
shutdown_timeoutnot being respected when processing remaining jobs left in the queue with a highshutdown_timeout.
- Remove scripts from
bin/
-
Refactor internals to use
concurrent-ruby -
Yield more exception details to handler. The new syntax allows you to setup a global exception with the following syntax:
# ex => The caught exception object # klass => The job class # args => An array of the args passed to the job SuckerPunch.exception_handler = -> (ex, klass, args) { ExceptionNotifier.notify_exception(ex) }
-
Invoke asynchronous job via
perform_asyncandperform_inclass method (backwards incompatible change):LogJob.perform_async("login") LogJob.perform_in(60, "login") # `perform` will be executed 60 sec. later
-
Drop support for Ruby
< 2.0 -
Allow shutdown timeout to be set (default is 8 sec.):
SuckerPunch.shutdown_timeout = 15 # time in seconds
- Update to use Celluloid
0.17.2 - Removed the
SuckerPunch.clear_queuesmethod
- Lock to Celluloid
0.16.0due to0.16.1being yanked
- Allow number of workers to be up to and including 200
- Don't clear out non-Sucker Punch Celluloid registry on boot #113
- Added Rails generate task to create a job from the command line
- Remove extraneous conditions in core extension
underscore
- Require
sucker_punchbefore inline testing library to ensure changes stick
- Update to use Celluloid
0.16
- Go back to Celluloid
0.15.2since it's not production ready
- Update to use Celluloid
0.16
- Delegate to Celluloid's exception handler
- Move
to_preparecallback in Railtie out of initializer
- Fix superclass for
testing/inlinemodule
- 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
workersmethod to job to specify number of Celluloid pool workers
- Removed the need for a configuration initializer
- include
SuckerPunch::Jobinstead 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#sizenow returns the number of messages enqueuedSuckerPunch::Queue#workersnow returns the number of workers in the queue- Update Celluloid dependency
- Remove
sizeoption when defining a queue, preferworkers - Update Celluloid dependency
- Prefer
workersstat method oversize - Update config to use
workersinstead ofsize
old config:
# config/initializers/sucker_punch.rb
SuckerPunch.config do
queue name: :log_queue, worker: LogWorker, size: 10
endnew 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