mirror of
https://github.com/plashchynski/crono.git
synced 2026-03-27 11:51:43 +01:00
add skeleton
This commit is contained in:
8
lib/periodicity/extensions/active_job.rb
Normal file
8
lib/periodicity/extensions/active_job.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
module Periodicity
|
||||
module Extensions
|
||||
class ActiveJob
|
||||
def perform_every(period, *args)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
13
lib/periodicity/rails.rb
Normal file
13
lib/periodicity/rails.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
module Periodicity
|
||||
def self.hook_rails!
|
||||
ActiveSupport.on_load(:active_job) do
|
||||
extend Sidekiq::Extensions::ActiveJob
|
||||
end
|
||||
end
|
||||
|
||||
class Rails < ::Rails::Engine
|
||||
initializer 'periodicity' do
|
||||
Periodicity.hook_rails!
|
||||
end
|
||||
end if defined?(::Rails)
|
||||
end
|
||||
Reference in New Issue
Block a user