mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Rails hooks should also work on server-side, #152
This commit is contained in:
parent
fff85c525f
commit
f8e92f282c
4 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
1.1.5
|
||||||
|
-----------
|
||||||
|
|
||||||
|
- Fix delayed extensions not available in Workers [#152]
|
||||||
|
|
||||||
1.1.4
|
1.1.4
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
require 'sidekiq/version'
|
require 'sidekiq/version'
|
||||||
require 'sidekiq/client'
|
require 'sidekiq/client'
|
||||||
require 'sidekiq/worker'
|
require 'sidekiq/worker'
|
||||||
require 'sidekiq/rails'
|
|
||||||
require 'sidekiq/redis_connection'
|
require 'sidekiq/redis_connection'
|
||||||
require 'sidekiq/util'
|
require 'sidekiq/util'
|
||||||
|
|
||||||
require 'sidekiq/extensions/action_mailer'
|
require 'sidekiq/extensions/action_mailer'
|
||||||
require 'sidekiq/extensions/active_record'
|
require 'sidekiq/extensions/active_record'
|
||||||
|
require 'sidekiq/rails' if defined?(::Rails)
|
||||||
|
|
||||||
module Sidekiq
|
module Sidekiq
|
||||||
|
|
||||||
|
|
|
@ -93,6 +93,8 @@ module Sidekiq
|
||||||
raise ArgumentError, "#{options[:require]} does not exist" unless File.exist?(options[:require])
|
raise ArgumentError, "#{options[:require]} does not exist" unless File.exist?(options[:require])
|
||||||
|
|
||||||
if File.directory?(options[:require])
|
if File.directory?(options[:require])
|
||||||
|
require 'rails'
|
||||||
|
require 'sidekiq/rails'
|
||||||
require File.expand_path("#{options[:require]}/config/environment.rb")
|
require File.expand_path("#{options[:require]}/config/environment.rb")
|
||||||
::Rails.application.eager_load!
|
::Rails.application.eager_load!
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
module Sidekiq
|
module Sidekiq
|
||||||
VERSION = "1.1.4"
|
VERSION = "1.1.5"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue