Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1a84f1be
Commit
1a84f1be
authored
Jun 02, 2021
by
Manoj M J
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reset objects after obtaining lock
This change resets objects after obtaining lock
parent
edb4eaa2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
app/services/users/refresh_authorized_projects_service.rb
app/services/users/refresh_authorized_projects_service.rb
+4
-5
No files found.
app/services/users/refresh_authorized_projects_service.rb
View file @
1a84f1be
...
@@ -24,11 +24,6 @@ module Users
...
@@ -24,11 +24,6 @@ module Users
@source
=
source
@source
=
source
@incorrect_auth_found_callback
=
incorrect_auth_found_callback
@incorrect_auth_found_callback
=
incorrect_auth_found_callback
@missing_auth_found_callback
=
missing_auth_found_callback
@missing_auth_found_callback
=
missing_auth_found_callback
# We need an up to date User object that has access to all relations that
# may have been created earlier. The only way to ensure this is to reload
# the User object.
user
.
reset
end
end
def
execute
def
execute
...
@@ -43,6 +38,10 @@ module Users
...
@@ -43,6 +38,10 @@ module Users
end
end
begin
begin
# We need an up to date User object that has access to all relations that
# may have been created earlier. The only way to ensure this is to reload
# the User object.
user
.
reset
execute_without_lease
execute_without_lease
ensure
ensure
Gitlab
::
ExclusiveLease
.
cancel
(
lease_key
,
uuid
)
Gitlab
::
ExclusiveLease
.
cancel
(
lease_key
,
uuid
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment