Add delay to profile updates to debounce them (#34137)

This commit is contained in:
Claire authored and GitHub committed 2025-03-11 16:17:17 +00:00
1 parent 725a68d273
commit 420ffdfb62
12 files changed
+17 -23

No files matched your search

@@ -7,7 +7,7 @@ class Api::V1::Profile::HeadersController < Api::BaseController
def destroy
@account = current_account
UpdateAccountService.new.call(@account, { header: nil }, raise_error: true)
ActivityPub::UpdateDistributionWorker.perform_async(@account.id)
ActivityPub::UpdateDistributionWorker.perform_in(ActivityPub::UpdateDistributionWorker::DEBOUNCE_DELAY, @account.id)
render json: @account, serializer: REST::CredentialAccountSerializer
end
end