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
0a9ea81c
Commit
0a9ea81c
authored
Jun 13, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear emptiness cache when NoRepository exception is detected
parent
c88ae4d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
app/services/geo/repository_sync_service.rb
app/services/geo/repository_sync_service.rb
+5
-1
app/services/geo/repository_update_service.rb
app/services/geo/repository_update_service.rb
+5
-1
No files found.
app/services/geo/repository_sync_service.rb
View file @
0a9ea81c
...
...
@@ -36,8 +36,12 @@ module Geo
expire_repository_caches
finished_at
=
DateTime
.
now
rescue
Gitlab
::
Git
::
Repository
::
NoRepository
,
Gitlab
::
Shell
::
Error
=>
e
rescue
Gitlab
::
Shell
::
Error
=>
e
Rails
.
logger
.
error
(
"
#{
self
.
class
.
name
}
: Error syncing repository for project
#{
project
.
path_with_namespace
}
:
#{
e
}
"
)
rescue
Gitlab
::
Git
::
Repository
::
NoRepository
=>
e
Rails
.
logger
.
error
(
"
#{
self
.
class
.
name
}
: Error invalid repository for project
#{
project
.
path_with_namespace
}
:
#{
e
}
"
)
log
(
'Expiring caches'
)
project
.
repository
.
after_create
end
[
started_at
,
finished_at
]
...
...
app/services/geo/repository_update_service.rb
View file @
0a9ea81c
...
...
@@ -20,8 +20,12 @@ module Geo
project
.
repository
.
expire_branch_cache
project
.
repository
.
expire_content_cache
end
rescue
Gitlab
::
Git
::
Repository
::
NoRepository
,
Gitlab
::
Shell
::
Error
=>
e
rescue
Gitlab
::
Shell
::
Error
=>
e
logger
.
error
"
#{
self
.
class
.
name
}
: Error fetching repository for project
#{
project
.
path_with_namespace
}
:
#{
e
}
"
rescue
Gitlab
::
Git
::
Repository
::
NoRepository
=>
e
logger
.
error
"
#{
self
.
class
.
name
}
: Error invalid repository for project
#{
project
.
path_with_namespace
}
:
#{
e
}
"
logger
.
warn
"
#{
self
.
class
.
name
}
: Invalidating cache for project
#{
project
.
path_with_namespace
}
"
project
.
repository
.
after_create
end
private
...
...
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