Skip to content

Commit

Permalink
Revert "Workaround for non-exact sidekiq timing"
Browse files Browse the repository at this point in the history
This reverts commit 9ff06a9.
  • Loading branch information
Zac committed Apr 4, 2017
1 parent b01dac1 commit de02ed9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions app/jobs/checkin_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ class CheckinJob < ActiveJob::Base
queue_as :checkin

def perform(flight)
sleep(flight.departure_time - 1.day - Time.now)

checkin = Southwest::Checkin.new(
names: flight.reservation.passengers.map {|p|
{ last_name: p[:last_name], first_name: p[:first_name] }
Expand Down
2 changes: 1 addition & 1 deletion app/models/flight.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def scheduled?
end

def schedule_checkin
schedule_at = departure_time - 1.day - 1.minute
schedule_at = departure_time - 1.day + 1.second
job = CheckinJob.set(wait_until: schedule_at).perform_later(self)
checkin = Checkin.find_or_initialize_by(flight: self)
checkin.update({
Expand Down

0 comments on commit de02ed9

Please sign in to comment.