Class: GemUninstallerJob

Inherits:
ApplicationJob show all
Defined in:
app/jobs/gem_uninstaller_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(gem_name) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'app/jobs/gem_uninstaller_job.rb', line 4

def perform(gem_name)
  logger.info "uninstall #{gem_name}"
  pl = Plugin.new(gem_name: gem_name)
  begin
    pl.uninstall!
    logger.info "uninstalled #{gem_name}"
  rescue Plugin::GemError
    logger.warn "uninstalling #{gem_name} is failed"
  end
end