From 8655579a94acdc8cb9ecdd31ad72fd427ba9ba67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Hendricksen?= Date: Wed, 3 Aug 2016 00:17:11 -0400 Subject: [PATCH] clean up the debug output --- lib/travis/api/v3/queries/crons.rb | 7 ++----- script/start_crons | 4 ---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/travis/api/v3/queries/crons.rb b/lib/travis/api/v3/queries/crons.rb index f848b6e3..0932d178 100644 --- a/lib/travis/api/v3/queries/crons.rb +++ b/lib/travis/api/v3/queries/crons.rb @@ -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 diff --git a/script/start_crons b/script/start_crons index 13e69b46..63a0273e 100755 --- a/script/start_crons +++ b/script/start_crons @@ -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"