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 end
def bump_potential_friendship(account, status) def bump_potential_friendship(account, status)
ActivityTracker.increment('activity:interactions') # ActivityTracker.increment('activity:interactions')
return if account.following?(status.account_id) return if account.following?(status.account_id)
PotentialFriendshipTracker.record(account.id, status.account_id, :favourite) PotentialFriendshipTracker.record(account.id, status.account_id, :favourite)
end end

View File

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

View File

@ -118,7 +118,7 @@ class PostStatusService < BaseService
def postprocess_status! def postprocess_status!
LinkCrawlWorker.perform_async(@status.id) 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 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 PollExpirationNotifyWorker.perform_at(@status.poll.expires_at, @status.poll.id) if @status.poll
end end
@ -214,7 +214,7 @@ class PostStatusService < BaseService
def bump_potential_friendship! def bump_potential_friendship!
return if !@status.reply? || @account.id == @status.in_reply_to_account_id 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) return if @account.following?(@status.in_reply_to_account_id)
PotentialFriendshipTracker.record(@account.id, @status.in_reply_to_account_id, :reply) PotentialFriendshipTracker.record(@account.id, @status.in_reply_to_account_id, :reply)
end end

View File

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

View File

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

View File

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