Skip to content

Commit

Permalink
check for nil
Browse files Browse the repository at this point in the history
  • Loading branch information
wwahammy committed Jun 22, 2018
1 parent 262d78d commit 1a2fb08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/new_scraper_clock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module Clockwork
if Match.in_progress.count.positive?
puts 'scraping at speed captain!'
scale_middle
elsif (Time.now + 1.hour).to_i > Match.next&.datetime.to_i
elsif Match.next.present? && (Time.now + 1.hour) > Match.next.datetime
puts 'sleeping for a bit'
sleep(30)
else
Expand Down

0 comments on commit 1a2fb08

Please sign in to comment.