summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-11-25 17:10:25 +0100
committerRémy Coutable <remy@rymai.me>2017-04-14 15:20:55 +0200
commit3cb84e06b7a118fb46b4e1e0d4885026c9d4a4d1 (patch)
treeef622687724fd429f6f7fb02a19a022550bf8608 /lib
parent2951a8543ef97ceb1bcaca5f5140d822729c950b (diff)
downloadgitlab-ce-3cb84e06b7a118fb46b4e1e0d4885026c9d4a4d1.tar.gz
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/api/helpers/internal_helpers.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/api/helpers/internal_helpers.rb b/lib/api/helpers/internal_helpers.rb
index 810e5063996..8f25bcf2f54 100644
--- a/lib/api/helpers/internal_helpers.rb
+++ b/lib/api/helpers/internal_helpers.rb
@@ -60,6 +60,13 @@ module API
rescue JSON::ParserError
{}
end
+
+ def log_user_activity(actor)
+ commands = Gitlab::GitAccess::DOWNLOAD_COMMANDS +
+ Gitlab::GitAccess::GIT_ANNEX_COMMANDS
+
+ ::Users::ActivityService.new(actor, 'Git SSH').execute if commands.include?(params[:action])
+ end
end
end
end