Skip to content

Commit 73461ee

Browse files
committed
AO3-6913 Small optimisation
1 parent 26fa248 commit 73461ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/admin_setting.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class << self
5555

5656
# run hourly with the resque scheduler
5757
def self.check_queue
58-
return unless self.invite_from_queue_enabled? && InviteRequest.count.positive? && Time.current >= self.invite_from_queue_at
58+
return unless self.invite_from_queue_enabled? && InviteRequest.any? && Time.current >= self.invite_from_queue_at
5959

6060
new_time = Time.current + self.invite_from_queue_frequency.hours
6161
self.first.update_attribute(:invite_from_queue_at, new_time)

0 commit comments

Comments
 (0)