Fix issue missing lecture when calling checkin
This commit is contained in:
@@ -3,7 +3,7 @@ class LectureCheckinJob < ApplicationJob
|
|||||||
|
|
||||||
def perform(*args)
|
def perform(*args)
|
||||||
lecture = Lecture.find_by(start_time: Time.now - 5.minutes..Time.now + 5.minutes)
|
lecture = Lecture.find_by(start_time: Time.now - 5.minutes..Time.now + 5.minutes)
|
||||||
return if lecture.empty?
|
return unless lecture.present?
|
||||||
|
|
||||||
puts(HTTParty.post(
|
puts(HTTParty.post(
|
||||||
"https://api.pushcut.io/2Kdtb5V7SoDXQOPxCJetk/notifications/Checkin",
|
"https://api.pushcut.io/2Kdtb5V7SoDXQOPxCJetk/notifications/Checkin",
|
||||||
|
|||||||
Reference in New Issue
Block a user