Skip to content
Snippets Groups Projects
Unverified Commit b4ba4b1b authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Spread out crawling randomly to avoid DDoSing the link (#8445)

* Spread out crawling randomly to avoid DDoSing the link

Fix #4486

* Remove trailing whitespace
parent df06f53f
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,9 @@ class ActivityPub::Activity
def crawl_links(status)
return if status.spoiler_text?
LinkCrawlWorker.perform_async(status.id)
# Spread out crawling randomly to avoid DDoSing the link
LinkCrawlWorker.perform_in(rand(1..59).seconds, status.id)
end
def distribute_to_followers(status)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment