summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 15:07:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 15:07:45 +0000
commit1219a9dce91f4edbc135dfc08299b4122b4825a8 (patch)
treee7d12a55d75a2d56e60d9527bef3724e3578866d /app/services
parent1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae (diff)
downloadgitlab-ce-1219a9dce91f4edbc135dfc08299b4122b4825a8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services')
-rw-r--r--app/services/members/update_highest_role_service.rb5
-rw-r--r--app/services/snippets/update_service.rb2
-rw-r--r--app/services/users/update_highest_member_role_service.rb2
3 files changed, 5 insertions, 4 deletions
diff --git a/app/services/members/update_highest_role_service.rb b/app/services/members/update_highest_role_service.rb
index ce1707c13ec..5ebd2e03df1 100644
--- a/app/services/members/update_highest_role_service.rb
+++ b/app/services/members/update_highest_role_service.rb
@@ -4,7 +4,8 @@ module Members
class UpdateHighestRoleService < ::BaseService
include ExclusiveLeaseGuard
- LEASE_TIMEOUT = 30.minutes.to_i
+ LEASE_TIMEOUT = 10.minutes.to_i
+ DELAY = 10.minutes
attr_reader :user_id
@@ -14,7 +15,7 @@ module Members
def execute
try_obtain_lease do
- UpdateHighestRoleWorker.perform_async(user_id)
+ UpdateHighestRoleWorker.perform_in(DELAY, user_id)
end
end
diff --git a/app/services/snippets/update_service.rb b/app/services/snippets/update_service.rb
index 76ce8231410..5794332a45b 100644
--- a/app/services/snippets/update_service.rb
+++ b/app/services/snippets/update_service.rb
@@ -52,7 +52,7 @@ module Snippets
create_commit(snippet) if snippet.repository_exists?
end
rescue => e
- snippet.errors.add(:repository, 'Error updating the snippet')
+ snippet.errors.add(:repository, e.message)
log_error(e.message)
false
diff --git a/app/services/users/update_highest_member_role_service.rb b/app/services/users/update_highest_member_role_service.rb
index 00f0af89e8d..90a5966265d 100644
--- a/app/services/users/update_highest_member_role_service.rb
+++ b/app/services/users/update_highest_member_role_service.rb
@@ -2,7 +2,7 @@
module Users
class UpdateHighestMemberRoleService < BaseService
- attr_reader :user, :identity_params
+ attr_reader :user
def initialize(user)
@user = user