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
2e0a2be9
Commit
2e0a2be9
authored
Apr 07, 2020
by
Robert May
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add error logging for unlink failures
parent
513d8a6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
lib/gitlab/set_cache.rb
lib/gitlab/set_cache.rb
+3
-1
spec/lib/gitlab/repository_set_cache_spec.rb
spec/lib/gitlab/repository_set_cache_spec.rb
+6
-0
No files found.
lib/gitlab/set_cache.rb
View file @
2e0a2be9
...
...
@@ -64,7 +64,9 @@ module Gitlab
else
redis
.
del
(
*
keys
)
end
rescue
::
Redis
::
CommandError
rescue
::
Redis
::
CommandError
=>
e
Gitlab
::
ErrorTracking
.
log_exception
(
e
)
redis
.
del
(
*
keys
)
end
end
...
...
spec/lib/gitlab/repository_set_cache_spec.rb
View file @
2e0a2be9
...
...
@@ -103,6 +103,12 @@ describe Gitlab::RepositorySetCache, :clean_gitlab_redis_cache do
expect
(
cache
.
expire
(
:foo
)).
to
eq
(
1
)
expect
(
cache
.
read
(
:foo
)).
to
be_empty
end
it
'logs the failure'
do
expect
(
Gitlab
::
ErrorTracking
).
to
receive
(
:log_exception
)
cache
.
expire
(
:foo
)
end
end
end
...
...
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