Update activity pub jobs
• Update: - activity pub jobs to retry 0 and dead: true • Remove: - ActivityPub DeliveryWorker on account suspension - Inbox, outbox, collections routes
This commit is contained in:
parent
1f9e33a80b
commit
f7a0b022d4
@ -10,8 +10,8 @@ class ActivityPub::InboxesController < Api::BaseController
|
||||
if unknown_deleted_account?
|
||||
head 202
|
||||
elsif signed_request_account
|
||||
upgrade_account
|
||||
process_payload
|
||||
# upgrade_account
|
||||
# process_payload
|
||||
head 202
|
||||
else
|
||||
render plain: signature_verification_failure_reason, status: 401
|
||||
@ -49,6 +49,6 @@ class ActivityPub::InboxesController < Api::BaseController
|
||||
end
|
||||
|
||||
def process_payload
|
||||
ActivityPub::ProcessingWorker.perform_async(signed_request_account.id, body, @account&.id)
|
||||
# ActivityPub::ProcessingWorker.perform_async(signed_request_account.id, body, @account&.id)
|
||||
end
|
||||
end
|
||||
|
@ -108,13 +108,13 @@ class SuspendAccountService < BaseService
|
||||
end
|
||||
|
||||
def distribute_delete_actor!
|
||||
ActivityPub::DeliveryWorker.push_bulk(delivery_inboxes) do |inbox_url|
|
||||
[delete_actor_json, @account.id, inbox_url]
|
||||
end
|
||||
# ActivityPub::DeliveryWorker.push_bulk(delivery_inboxes) do |inbox_url|
|
||||
# [delete_actor_json, @account.id, inbox_url]
|
||||
# end
|
||||
|
||||
ActivityPub::LowPriorityDeliveryWorker.push_bulk(low_priority_delivery_inboxes) do |inbox_url|
|
||||
[delete_actor_json, @account.id, inbox_url]
|
||||
end
|
||||
# ActivityPub::LowPriorityDeliveryWorker.push_bulk(low_priority_delivery_inboxes) do |inbox_url|
|
||||
# [delete_actor_json, @account.id, inbox_url]
|
||||
# end
|
||||
end
|
||||
|
||||
def delete_actor_json
|
||||
|
@ -6,7 +6,7 @@ class ActivityPub::DeliveryWorker
|
||||
STOPLIGHT_FAILURE_THRESHOLD = 10
|
||||
STOPLIGHT_COOLDOWN = 60
|
||||
|
||||
sidekiq_options queue: 'push', retry: 3, dead: false
|
||||
sidekiq_options queue: 'push', retry: 0, dead: true
|
||||
|
||||
HEADERS = { 'Content-Type' => 'application/activity+json' }.freeze
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
class ActivityPub::DistributionWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
sidekiq_options queue: 'push'
|
||||
sidekiq_options queue: 'push', retry: 0, dead: true
|
||||
|
||||
def perform(status_id)
|
||||
@status = Status.find(status_id)
|
||||
|
@ -1,5 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::LowPriorityDeliveryWorker < ActivityPub::DeliveryWorker
|
||||
sidekiq_options queue: 'pull', retry: 3, dead: false
|
||||
sidekiq_options queue: 'pull', retry: 0, dead: true
|
||||
end
|
||||
|
@ -3,7 +3,7 @@
|
||||
class ActivityPub::ProcessingWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
sidekiq_options backtrace: true, retry: 3
|
||||
sidekiq_options backtrace: true, retry: 0, dead: true
|
||||
|
||||
def perform(account_id, body, delivered_to_account_id = nil)
|
||||
ActivityPub::ProcessCollectionService.new.call(body, Account.find(account_id), override_timestamps: true, delivered_to_account_id: delivered_to_account_id, delivery: true)
|
||||
|
@ -73,12 +73,12 @@ Rails.application.routes.draw do
|
||||
resource :follow, only: [:create], controller: :account_follow
|
||||
resource :unfollow, only: [:create], controller: :account_unfollow
|
||||
|
||||
resource :outbox, only: [:show], module: :activitypub
|
||||
resource :inbox, only: [:create], module: :activitypub
|
||||
resources :collections, only: [:show], module: :activitypub
|
||||
# resource :outbox, only: [:show], module: :activitypub
|
||||
# resource :inbox, only: [:create], module: :activitypub
|
||||
# resources :collections, only: [:show], module: :activitypub
|
||||
end
|
||||
|
||||
resource :inbox, only: [:create], module: :activitypub
|
||||
# resource :inbox, only: [:create], module: :activitypub
|
||||
|
||||
get '/interact/:id', to: 'remote_interaction#new', as: :remote_interaction
|
||||
post '/interact/:id', to: 'remote_interaction#create'
|
||||
|
Loading…
Reference in New Issue
Block a user