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