Relay reset delivery tracker model spec and callback (#36027)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2025-09-05 12:56:15 +00:00
1 parent 05a655f33e
commit 1b664cf20d
2 files changed
+15 -6

No files matched your search

+6 -2
View File
@@ -34,7 +34,7 @@ class Relay < ApplicationRecord
payload = Oj.dump(follow_activity(activity_id))
update!(state: :pending, follow_activity_id: activity_id)
DeliveryFailureTracker.reset!(inbox_url)
reset_delivery_tracker
ActivityPub::DeliveryWorker.perform_async(payload, some_local_account.id, inbox_url)
end
@@ -43,12 +43,16 @@ class Relay < ApplicationRecord
payload = Oj.dump(unfollow_activity(activity_id))
update!(state: :idle, follow_activity_id: nil)
DeliveryFailureTracker.reset!(inbox_url)
reset_delivery_tracker
ActivityPub::DeliveryWorker.perform_async(payload, some_local_account.id, inbox_url)
end
private
def reset_delivery_tracker
DeliveryFailureTracker.reset!(inbox_url)
end
def follow_activity(activity_id)
{
'@context': ActivityPub::TagManager::CONTEXT,