clean up the debug output
This commit is contained in:
parent
77e47bc41a
commit
8655579a94
|
@ -6,16 +6,13 @@ module Travis::API::V3
|
||||||
end
|
end
|
||||||
|
|
||||||
def start_all()
|
def start_all()
|
||||||
puts "reviewing #{Models::Cron.count} crons."
|
|
||||||
Models::Cron.all.select do |cron|
|
Models::Cron.all.select do |cron|
|
||||||
begin
|
begin
|
||||||
@cron = cron
|
@cron = cron
|
||||||
ne = cron.next_enqueuing
|
start(cron) if cron.next_enqueuing <= Time.now
|
||||||
puts "Next enqueuing: #{ne}, time now: #{Time.now}, will it run? #{ne <= Time.now}"
|
|
||||||
start(cron) if ne <= Time.now
|
|
||||||
rescue => e
|
rescue => e
|
||||||
Raven.capture_exception(e, tags: { 'cron_id' => @cron.try(:id) })
|
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
|
next
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,8 +6,4 @@ require 'travis/api/app'
|
||||||
|
|
||||||
Travis::Api::App.setup
|
Travis::Api::App.setup
|
||||||
|
|
||||||
puts "start"
|
|
||||||
|
|
||||||
Travis::API::V3::Services::Crons::Start.new(nil,nil,nil).run!
|
Travis::API::V3::Services::Crons::Start.new(nil,nil,nil).run!
|
||||||
|
|
||||||
puts "done"
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user