mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-24 08:54:08 +00:00
fix(apps): fix pruning old application device activations
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
d300f9deea
commit
dd00620b9a
1 changed files with 1 additions and 1 deletions
|
@ -426,7 +426,7 @@ defmodule Mobilizon.Applications do
|
|||
|
||||
@spec prune_old_application_device_activations(pos_integer()) :: {non_neg_integer(), nil}
|
||||
def prune_old_application_device_activations(lifetime) do
|
||||
exp = DateTime.add(DateTime.utc_now(), -lifetime)
|
||||
exp = DateTime.utc_now() |> DateTime.add(-lifetime) |> DateTime.to_unix()
|
||||
|
||||
ApplicationDeviceActivation
|
||||
|> where([at], at.expires_in < ^exp)
|
||||
|
|
Loading…
Reference in a new issue