Commit 5626842 1 parent 955b820 commit 5626842 Copy full SHA for 5626842
File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,11 @@ class << self
55
55
56
56
# run hourly with the resque scheduler
57
57
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 )
63
63
end
64
64
65
65
@queue = :admin
You can’t perform that action at this time.
0 commit comments