Commit Graph

16 Commits

Author SHA1 Message Date
GitLab Bot 4c5468b408 Add latest changes from gitlab-org/gitlab@master 2020-06-24 15:08:50 +00:00
GitLab Bot 1219a9dce9 Add latest changes from gitlab-org/gitlab@master 2020-04-01 15:07:45 +00:00
GitLab Bot 669c24d927 Add latest changes from gitlab-org/gitlab@master 2020-01-06 09:07:42 +00:00
Michael Kozono 3b97ea0a0c Merge branch 'frozen_string_literal_spec_services' into 'master'
Add frozen_string_literal to spec/services

See merge request gitlab-org/gitlab-ce!27267
2019-04-12 16:41:27 +00:00
Cindy Pallares 65b4b0cf46
Fix typo in activity lease 2019-04-11 17:38:28 -05:00
Thong Kuah 85b29c1c2f Add frozen_string_literal to spec/services
Probably useful as we often move these files to "new" files.
2019-04-12 10:14:54 +12: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
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
Rémy Coutable ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Paul Charlton cb3b4a15e6 Support multiple Redis instances based on queue type 2017-07-11 03:35:47 +00:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00: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