Class: ExtBatchMonitor

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
lib/templates/workers/ext_batch_monitor.rb

Instance Method Summary collapse

Instance Method Details

#perform(*args) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/templates/workers/ext_batch_monitor.rb', line 6

def perform(*args)
  include Sys
  batch_name = File.basename(__FILE__).gsub('.rb', '')
  batch = ExtBatch.new(batch_name, pid_flag: false)
  begin
    ExtBatch.monitor_pid_file(batch)

  rescue Exception => e
    batch.exception e
  end
  batch.end
end