summaryrefslogtreecommitdiff
path: root/app/services/members
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-07 15:09:30 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-07 15:09:30 +0000
commitc6b3ec3f56fa32a0e0ed3de0d0878d25f1adaddf (patch)
tree967afee9a510ff9dd503ebd83706dc760ec2e3ed /app/services/members
parent903ccf7c93eb9490c76857bffe744249cc07de09 (diff)
downloadgitlab-ce-c6b3ec3f56fa32a0e0ed3de0d0878d25f1adaddf.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/members')
-rw-r--r--app/services/members/update_highest_role_service.rb39
1 files changed, 0 insertions, 39 deletions
diff --git a/app/services/members/update_highest_role_service.rb b/app/services/members/update_highest_role_service.rb
deleted file mode 100644
index 5ebd2e03df1..00000000000
--- a/app/services/members/update_highest_role_service.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: true
-
-module Members
- class UpdateHighestRoleService < ::BaseService
- include ExclusiveLeaseGuard
-
- LEASE_TIMEOUT = 10.minutes.to_i
- DELAY = 10.minutes
-
- attr_reader :user_id
-
- def initialize(user_id)
- @user_id = user_id
- end
-
- def execute
- try_obtain_lease do
- UpdateHighestRoleWorker.perform_in(DELAY, user_id)
- end
- end
-
- private
-
- def lease_key
- "update_highest_role:#{user_id}"
- end
-
- def lease_timeout
- LEASE_TIMEOUT
- end
-
- # Do not release the lease before the timeout to
- # prevent multiple jobs being executed during the
- # defined timeout
- def lease_release?
- false
- end
- end
-end