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
c20672b4
Commit
c20672b4
authored
Sep 10, 2019
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract fail_unimplemented_klass!
parent
eb5cd3f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
ee/app/services/geo/base_file_service.rb
ee/app/services/geo/base_file_service.rb
+8
-0
ee/app/services/geo/file_download_service.rb
ee/app/services/geo/file_download_service.rb
+1
-4
ee/app/services/geo/file_upload_service.rb
ee/app/services/geo/file_upload_service.rb
+1
-4
ee/lib/gitlab/geo/replication/base_retriever.rb
ee/lib/gitlab/geo/replication/base_retriever.rb
+1
-0
No files found.
ee/app/services/geo/base_file_service.rb
View file @
c20672b4
...
...
@@ -24,6 +24,14 @@ module Geo
private
def
fail_unimplemented_klass!
(
type
:)
error_message
=
"Cannot find a handler for Gitlab::Geo
#{
type
}
for object_type = '
#{
object_type
}
'"
log_error
(
error_message
)
raise
NotImplementedError
,
error_message
end
def
user_upload?
Gitlab
::
Geo
::
Replication
.
object_type_from_user_uploads?
(
object_type
)
end
...
...
ee/app/services/geo/file_download_service.rb
View file @
c20672b4
...
...
@@ -37,10 +37,7 @@ module Geo
return
Gitlab
::
Geo
::
Replication
::
JobArtifactDownloader
if
job_artifact?
return
Gitlab
::
Geo
::
Replication
::
LfsDownloader
if
lfs?
error_message
=
"Cannot find a Gitlab::Geo Downloader for object_type = '
#{
object_type
}
'"
log_error
(
error_message
)
raise
NotImplementedError
,
error_message
fail_unimplemented_klass!
(
type:
'Downloader'
)
end
def
log_file_download
(
mark_as_synced
,
download_result
,
start_time
)
...
...
ee/app/services/geo/file_upload_service.rb
View file @
c20672b4
...
...
@@ -41,10 +41,7 @@ module Geo
return
Gitlab
::
Geo
::
Replication
::
JobArtifactRetriever
if
job_artifact?
return
Gitlab
::
Geo
::
Replication
::
LfsRetriever
if
lfs?
error_message
=
"Cannot find a Gitlab::Geo Uploader for object_type = '
#{
object_type
}
'"
log_error
(
error_message
)
raise
NotImplementedError
,
error_message
fail_unimplemented_klass!
(
type:
'Retriever'
)
end
end
end
ee/lib/gitlab/geo/replication/base_retriever.rb
View file @
c20672b4
...
...
@@ -5,6 +5,7 @@ module Gitlab
module
Replication
class
BaseRetriever
include
LogHelpers
include
Gitlab
::
Utils
::
StrongMemoize
attr_reader
:object_db_id
,
:message
...
...
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