Periodically remove expired PuSH subscribers (#4654)
This commit is contained in:
parent
143b77e10d
commit
f391a4673a
6 changed files with 15 additions and 4 deletions
|
@ -26,6 +26,7 @@ class Subscription < ApplicationRecord
|
|||
|
||||
scope :confirmed, -> { where(confirmed: true) }
|
||||
scope :future_expiration, -> { where(arel_table[:expires_at].gt(Time.now.utc)) }
|
||||
scope :expired, -> { where(arel_table[:expires_at].lt(Time.now.utc)) }
|
||||
scope :active, -> { confirmed.future_expiration }
|
||||
|
||||
def lease_seconds=(value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue