Disable unused DistributionWorker and activity:interactions

This commit is contained in:
Fosco Marotto 2021-02-04 13:48:50 -05:00
parent 34a888ca10
commit 22b7b2ab8b
6 changed files with 12 additions and 13 deletions

View File

@ -39,7 +39,7 @@ class FavouriteService < BaseService
end
def bump_potential_friendship(account, status)
ActivityTracker.increment('activity:interactions')
# ActivityTracker.increment('activity:interactions')
return if account.following?(status.account_id)
PotentialFriendshipTracker.record(account.id, status.account_id, :favourite)
end

View File

@ -26,7 +26,7 @@ class FollowService < BaseService
return
end
ActivityTracker.increment('activity:interactions')
# ActivityTracker.increment('activity:interactions')
if target_account.locked?
request_follow(source_account, target_account, reblogs: reblogs)

View File

@ -118,7 +118,7 @@ class PostStatusService < BaseService
def postprocess_status!
LinkCrawlWorker.perform_async(@status.id)
DistributionWorker.perform_async(@status.id)
# DistributionWorker.perform_async(@status.id)
ExpiringStatusWorker.perform_at(@status.expires_at, @status.id) if @status.expires_at && @account.is_pro
PollExpirationNotifyWorker.perform_at(@status.poll.expires_at, @status.poll.id) if @status.poll
end
@ -214,7 +214,7 @@ class PostStatusService < BaseService
def bump_potential_friendship!
return if !@status.reply? || @account.id == @status.in_reply_to_account_id
ActivityTracker.increment('activity:interactions')
# ActivityTracker.increment('activity:interactions')
return if @account.following?(@status.in_reply_to_account_id)
PotentialFriendshipTracker.record(@account.id, @status.in_reply_to_account_id, :reply)
end

View File

@ -8,9 +8,9 @@ class ProcessQuoteService < BaseService
create_notification(status)
bump_potential_friendship(status)
end
private
def create_notification(status)
quoted_status = status.quote
@ -18,12 +18,11 @@ class ProcessQuoteService < BaseService
LocalNotificationWorker.perform_async(quoted_status.account_id, status.id, status.class.name)
end
end
def bump_potential_friendship(status)
ActivityTracker.increment('activity:interactions')
# ActivityTracker.increment('activity:interactions')
return if status.account.following?(status.quote.account_id)
PotentialFriendshipTracker.record(status.account_id, status.quote.account_id, :reblog)
end
end

View File

@ -28,7 +28,7 @@ class ReblogService < BaseService
text = options[:status] || ''
reblog = account.statuses.create!(reblog: reblogged_status, text: text, visibility: visibility)
DistributionWorker.perform_async(reblog.id)
# DistributionWorker.perform_async(reblog.id)
create_notification(reblog)
bump_potential_friendship(account, reblog)
@ -47,7 +47,7 @@ class ReblogService < BaseService
end
def bump_potential_friendship(account, reblog)
ActivityTracker.increment('activity:interactions')
# ActivityTracker.increment('activity:interactions')
return if account.following?(reblog.reblog.account_id)
PotentialFriendshipTracker.record(account.id, reblog.reblog.account_id, :reblog)
end

View File

@ -17,7 +17,7 @@ class VoteService < BaseService
end
end
ActivityTracker.increment('activity:interactions')
# ActivityTracker.increment('activity:interactions')
end
end