about summary refs log tree commit diff
path: root/app/services/fetch_link_card_service.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-05-16 23:10:12 +0200
committerGitHub <noreply@github.com>2018-05-16 23:10:12 +0200
commit4bf43e6f3e93643d989a2872763b41505fab2206 (patch)
treee1b781fe4fae9d02284e5e836338cc598431413f /app/services/fetch_link_card_service.rb
parent80aad16e1035a72fec1af56aaac458a35e1f02c5 (diff)
parent78ac246b877072bb5f94da34d29612fafde3a8ae (diff)
Merge pull request #486 from ThibG/glitch-soc/merge-upstream
Merge changes from upstream
Diffstat (limited to 'app/services/fetch_link_card_service.rb')
-rw-r--r--app/services/fetch_link_card_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb
index f9b1b2f0c..86d0f9971 100644
--- a/app/services/fetch_link_card_service.rb
+++ b/app/services/fetch_link_card_service.rb
@@ -23,6 +23,8 @@ class FetchLinkCardService < BaseService
       if lock.acquired?
         @card = PreviewCard.find_by(url: @url)
         process_url if @card.nil? || @card.updated_at <= 2.weeks.ago
+      else
+        raise Mastodon::RaceConditionError
       end
     end