better output

This commit is contained in:
Renée Hendricksen 2016-08-02 23:16:00 -04:00
parent 0dc7e2743c
commit abe7b13605

View File

@ -6,12 +6,12 @@ module Travis::API::V3
end end
def start_all() def start_all()
puts "starting #{Models::Cron.count} crons." puts "reviewing #{Models::Cron.count} crons."
Models::Cron.all.select do |cron| Models::Cron.all.select do |cron|
@cron = cron @cron = cron
puts cron.next_enqueuing ne = cron.next_enqueuing
puts Time.now puts "Next enqueuing: #{ne}, time now: #{Time.now}, will it run? #{ne <= Time.now}"
start(cron) if cron.next_enqueuing <= Time.now start(cron) if ne <= Time.now
end end
rescue => e rescue => e
puts "bad things happened" puts "bad things happened"