Commit Graph

15 Commits

Author SHA1 Message Date
GitLab Bot 2e4e6e9bb6 Add latest changes from gitlab-org/gitlab@master 2021-06-02 12:10:05 +00:00
GitLab Bot 0ae8428c8e Add latest changes from gitlab-org/gitlab@master 2021-05-11 21:10:21 +00:00
GitLab Bot b38fc20ae0 Add latest changes from gitlab-org/gitlab@master 2021-03-23 12:09:33 +00:00
GitLab Bot 669c24d927 Add latest changes from gitlab-org/gitlab@master 2020-01-06 09:07:42 +00:00
Cindy Pallares 65b4b0cf46
Fix typo in activity lease 2019-04-11 17:38:28 -05:00
Imre Farkas a0e97b1c6a
Optimize Redis usage in User::ActivityService
Avoid checking Redis when User#last_activity_on is already up to date.
2019-02-14 11:14:00 +01:00
Stan Hu 1436423a49 Fix failing 500 errors when deploy tokens are used to clone
A DeployToken responds to `:username`, but it returns the username for the
token, not a User object. Don't attempt to log user activity in this case.

Closes gitlab-org/gitlab-ee#7080
2018-08-02 11:18:31 -07:00
Rémy Coutable daa1ac0f08 Merge branch 'frozen-string-enable-apps-services-inner-even-more' into 'master'
Enable more frozen string in app/services/**/*.rb

See merge request gitlab-org/gitlab-ce!20702
2018-07-19 14:50:54 +00:00
gfyoung 0cf45debb4 Enable more frozen string in app/services/**/*.rb
Partially addresses #47424.
2018-07-18 14:07:50 -07:00
Imre Farkas c62fce9883
Delete UserActivities and related workers 2018-07-18 15:44:10 +02:00
Toon Claes d13669716a Create idea of read-only database
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo
secondary node). But in GitLab CE it also might be useful to have the
"read-only" idea around. So port it back to GitLab CE.

Also having the principle of read-only in GitLab CE would hopefully
lead to less errors introduced, doing write operations when there
aren't allowed for read-only calls.

Closes gitlab-org/gitlab-ce#37534.
2017-10-06 22:37:40 +02:00
Stan Hu 46e9161b32 Fix typo in user activity debug log message 2017-06-03 23:11:53 -07:00
Rémy Coutable cfe19b795e Add a new Gitlab::UserActivities class to track user activities
This new class uses a Redis Hash instead of a Sorted Set.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-14 15:20:55 +02:00
James Lopez 3cb84e06b7 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.
2017-04-14 15:20:55 +02:00
James Lopez 2951a8543e Add user activity service and spec. Also added relevant - NOT offline - migration
It uses a user activity table instead of a column in users.
Tested with mySQL and postgreSQL
2017-04-14 15:20:55 +02:00