mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Spread out crawling randomly to avoid DDoSing the link (#8445)
* Spread out crawling randomly to avoid DDoSing the link Fix #4486 * Remove trailing whitespace
This commit is contained in:
parent
df06f53f9b
commit
b4ba4b1b5d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user