mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-27 12:42:43 +00:00
Fix async refresh never being finished when status cannot be fetched (#35500)
This commit is contained in:
parent
d121007927
commit
8cf7a77808
8 changed files with 26 additions and 30 deletions
|
|
@ -66,7 +66,11 @@ class Api::V1::StatusesController < Api::BaseController
|
|||
add_async_refresh_header(async_refresh)
|
||||
elsif !current_account.nil? && @status.should_fetch_replies?
|
||||
add_async_refresh_header(AsyncRefresh.create(refresh_key))
|
||||
ActivityPub::FetchAllRepliesWorker.perform_async(@status.id)
|
||||
|
||||
WorkerBatch.new.within do |batch|
|
||||
batch.connect(refresh_key, threshold: 1.0)
|
||||
ActivityPub::FetchAllRepliesWorker.perform_async(@status.id, { 'batch_id' => batch.id })
|
||||
end
|
||||
end
|
||||
|
||||
render json: @context, serializer: REST::ContextSerializer, relationships: StatusRelationshipsPresenter.new(statuses, current_user&.account_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue