5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-01 22:46:07 +00:00

fixup! feat: almacenar y renovar tokens de distributed press

This commit is contained in:
f 2023-01-20 18:28:29 -03:00
parent 67c0b29029
commit cbf7b58927

View file

@ -18,9 +18,9 @@ class DistributedPressPublisher < ApplicationRecord
before_save :update_expires_at_from_token!, :update_token_from_client!
# Devuelve todos los tokens que vencen en una hora
scope :with_about_to_expire_tokens, -> do
scope :with_about_to_expire_tokens, lambda {
where('expires_at > ? and expires_at < ?', Time.now, Time.now + 1.hour)
end
}
# Al cambiar el token genera un cliente nuevo
#