clean up the debug output

This commit is contained in:
Renée Hendricksen 2016-08-03 00:17:11 -04:00
parent 77e47bc41a
commit 8655579a94
2 changed files with 2 additions and 9 deletions

View File

@ -6,16 +6,13 @@ module Travis::API::V3
end
def start_all()
puts "reviewing #{Models::Cron.count} crons."
Models::Cron.all.select do |cron|
begin
@cron = cron
ne = cron.next_enqueuing
puts "Next enqueuing: #{ne}, time now: #{Time.now}, will it run? #{ne <= Time.now}"
start(cron) if ne <= Time.now
start(cron) if cron.next_enqueuing <= Time.now
rescue => e
Raven.capture_exception(e, tags: { 'cron_id' => @cron.try(:id) })
sleep(10)
sleep(10) # This ensures the dyno does not spin down before the http request to send the error to sentry completes
next
end
end

View File

@ -6,8 +6,4 @@ require 'travis/api/app'
Travis::Api::App.setup
puts "start"
Travis::API::V3::Services::Crons::Start.new(nil,nil,nil).run!
puts "done"