diff options
author | ThibG <thib@sitedethib.com> | 2018-08-26 19:12:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-26 19:12:07 +0200 |
commit | af934b90710a2ce1099d3ceda5de7bcf0e94595c (patch) | |
tree | 71e25690e6300d0235d515ccd0241d082c8d1abe /app/lib/activitypub/activity.rb | |
parent | 2903f8f36b7c41b77de4ad6c8c5b0a6c0b2a7ace (diff) | |
parent | be20eb4b2f4e55c472263a98a2c07b4e805d9bd5 (diff) |
Merge pull request #674 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/lib/activitypub/activity.rb')
-rw-r--r-- | app/lib/activitypub/activity.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/lib/activitypub/activity.rb b/app/lib/activitypub/activity.rb index 03476920b..3a39b723e 100644 --- a/app/lib/activitypub/activity.rb +++ b/app/lib/activitypub/activity.rb @@ -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) |