Class: RerunTask::UnfinishedRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/rerun_task/unfinished_runner.rb

Class Method Summary collapse

Class Method Details

.crontab_retryObject



4
5
6
7
8
9
10
11
12
# File 'lib/rerun_task/unfinished_runner.rb', line 4

def self.crontab_retry
  crontab = Crontab.new()
  Pids.unfinished.each do |process_file|
    cmd = crontab.find_task(process_file.process_name)
    next if cmd.nil?
    puts "Running command #{cmd} again"
    system("#{cmd} &")
  end
end