Class: Patches::Worker

Inherits:
Object
  • Object
show all
Includes:
ApplicationVersionValidation, Sidekiq::Worker
Defined in:
lib/patches/worker.rb

Instance Method Summary collapse

Methods included from ApplicationVersionValidation

#valid_application_version?

Instance Method Details

#perform(runner, params = {}) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/patches/worker.rb', line 9

def perform(runner, params = {})
  if valid_application_version?(params['application_version'])
    runner.constantize.new.perform
  else
    self.class.perform_in(Patches::Config.configuration.retry_after_version_mismatch_in, runner, params)
  end
end