projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
761cc5b
)
Limit expirations for each cron execution to 50.
author
Mark Felder
<feld@FreeBSD.org>
Sat, 8 Aug 2020 17:49:02 +0000
(12:49 -0500)
committer
Mark Felder
<feld@FreeBSD.org>
Sat, 8 Aug 2020 17:49:02 +0000
(12:49 -0500)
This should prevent servers from being crushed. 50/min is a pretty good rate.
lib/pleroma/activity_expiration.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/activity_expiration.ex
b/lib/pleroma/activity_expiration.ex
index 7cc9668b373cc252cf0f42d812cc459e4c321324..84edf68ef3e3f20a20bc3169ac9a3b4639d253cd 100644
(file)
--- a/
lib/pleroma/activity_expiration.ex
+++ b/
lib/pleroma/activity_expiration.ex
@@
-46,6
+46,7
@@
defmodule Pleroma.ActivityExpiration do
ActivityExpiration
|> where([exp], exp.scheduled_at < ^naive_datetime)
+ |> limit(50)
|> Repo.all()
end