about summary refs log tree commit diff
path: root/app/lib/activitypub
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2018-05-16 19:29:45 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-05-16 12:29:45 +0200
commit55fd55714a374eaedfab457f7e7254f816911ff1 (patch)
treee1dbfa9c8d836a14269f5f9af79bc0596d283698 /app/lib/activitypub
parent65d6b253fb4d8a81d41ecfa25078205569fcef21 (diff)
Raise Mastodon::RaceConditionError if Redis lock failed (#7511)
An explicit error allows user agents to know the error and Sidekiq to
retry.
Diffstat (limited to 'app/lib/activitypub')
-rw-r--r--app/lib/activitypub/activity/create.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb
index 8d17a4ebe..ab1d63cd4 100644
--- a/app/lib/activitypub/activity/create.rb
+++ b/app/lib/activitypub/activity/create.rb
@@ -11,6 +11,8 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
       if lock.acquired?
         @status = find_existing_status
         process_status if @status.nil?
+      else
+        raise Mastodon::RaceConditionError
       end
     end