From 3cb84e06b7a118fb46b4e1e0d4885026c9d4a4d1 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Fri, 25 Nov 2016 17:10:25 +0100 Subject: Remove user activities table and use redis instead of PG for recording activities Refactored specs and added a post deployment migration to remove the activity users table. --- app/services/users/activity_service.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/services/users') diff --git a/app/services/users/activity_service.rb b/app/services/users/activity_service.rb index b81f947cd01..483821b7f01 100644 --- a/app/services/users/activity_service.rb +++ b/app/services/users/activity_service.rb @@ -14,13 +14,9 @@ module Users private def record_activity - user_activity.touch + @author.record_activity Rails.logger.debug("Recorded activity: #{@activity} for User ID: #{@author.id} (username: #{@author.username}") end - - def user_activity - UserActivity.find_or_initialize_by(user: @author) - end end end -- cgit v1.2.1