mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-01-10 17:25:26 +00:00
Limit expirations for each cron execution to 50.
This should prevent servers from being crushed. 50/min is a pretty good rate.
This commit is contained in:
parent
761cc5b4a2
commit
e08ea01d09
1 changed files with 1 additions and 0 deletions
|
@ -46,6 +46,7 @@ defmodule Pleroma.ActivityExpiration do
|
|||
|
||||
ActivityExpiration
|
||||
|> where([exp], exp.scheduled_at < ^naive_datetime)
|
||||
|> limit(50)
|
||||
|> Repo.all()
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue