configurable lifetime for ephemeral activities
This commit is contained in:
parent
4954667fb2
commit
2c2094d4b2
5 changed files with 26 additions and 6 deletions
|
|
@ -77,6 +77,7 @@ defmodule Pleroma.Workers.PurgeExpiredActivity do
|
|||
def expires_late_enough?(scheduled_at) do
|
||||
now = DateTime.utc_now()
|
||||
diff = DateTime.diff(scheduled_at, now, :millisecond)
|
||||
diff > :timer.hours(1)
|
||||
min_lifetime = Pleroma.Config.get([__MODULE__, :min_lifetime], 600)
|
||||
diff > :timer.seconds(min_lifetime)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue