0
0
Fork 0

Raise Mastodon::RaceConditionError if Redis lock failed (#7511)

An explicit error allows user agents to know the error and Sidekiq to
retry.
This commit is contained in:
Akihiko Odaki 2018-05-16 19:29:45 +09:00 committed by Eugen Rochko
parent 65d6b253fb
commit 55fd55714a
6 changed files with 12 additions and 0 deletions

View file

@ -15,6 +15,8 @@ class OStatus::Activity::Creation < OStatus::Activity::Base
@status = find_status(id)
return [@status, false] unless @status.nil?
@status = process_status
else
raise Mastodon::RaceConditionError
end
end