Skip to content

Commit 5626842

Browse files
committed
Reviewdog
1 parent 955b820 commit 5626842

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/models/admin_setting.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ class << self
5555

5656
# run hourly with the resque scheduler
5757
def self.check_queue
58-
if self.invite_from_queue_enabled? && InviteRequest.count > 0 && Time.current >= self.invite_from_queue_at
59-
new_time = Time.current + self.invite_from_queue_frequency.hours
60-
self.first.update_attribute(:invite_from_queue_at, new_time)
61-
InviteFromQueueJob.perform_now(count: invite_from_queue_number)
62-
end
58+
return unless self.invite_from_queue_enabled? && InviteRequest.count.positive? && Time.current >= self.invite_from_queue_at
59+
60+
new_time = Time.current + self.invite_from_queue_frequency.hours
61+
self.first.update_attribute(:invite_from_queue_at, new_time)
62+
InviteFromQueueJob.perform_now(count: invite_from_queue_number)
6363
end
6464

6565
@queue = :admin

0 commit comments

Comments
 (0)