add a debugging task for running all schedules
This commit is contained in:
parent
2c56f8df7c
commit
6e1809ce32
|
@ -19,3 +19,17 @@ end
|
|||
task version_check: :environment do
|
||||
Jobs::VersionCheck.new.execute(nil)
|
||||
end
|
||||
|
||||
def time
|
||||
start = Time.now
|
||||
yield
|
||||
puts "Elapsed #{((Time.now - start) * 1000).to_i}ms"
|
||||
end
|
||||
|
||||
desc "run every task the scheduler knows about in that order, use only for debugging"
|
||||
task 'scheduler:run_all' => :environment do
|
||||
Scheduler::Manager.discover_schedules.each do |schedule|
|
||||
puts "Running #{schedule}"
|
||||
time { schedule.new.execute({}) }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue