Class: Schlepper::Process

Inherits:
Object
  • Object
show all
Defined in:
lib/schlepper/process.rb

Instance Method Summary collapse

Instance Method Details

#run_allObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/schlepper/process.rb', line 6

def run_all
  create_table_if_necessary
  fetch_script_numbers_from_database
  load_tasks_that_need_run

  puts "#{Schlepper::Task.children.count} tasks to process"
  puts '~~~~~~~~~~~~~~~~~~~~~'

  Schlepper::Task.children.each { |klass| process_one klass }
rescue => e
  offending_file = e.send(:caller_locations).first.path.split("/").last
  puts "#{offending_file} caused an error: "
  raise e
end