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
b15c90c7
Commit
b15c90c7
authored
Feb 19, 2021
by
Alex Ives
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor skippable? as registry_exists?
Relates to
https://gitlab.com/gitlab-org/gitlab/issues/232516
parent
e636e3fe
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
ee/lib/gitlab/geo/log_cursor/events/base_event.rb
ee/lib/gitlab/geo/log_cursor/events/base_event.rb
+1
-1
ee/lib/gitlab/geo/log_cursor/events/cache_invalidation_event.rb
.../gitlab/geo/log_cursor/events/cache_invalidation_event.rb
+2
-2
ee/lib/gitlab/geo/log_cursor/events/hashed_storage_migrated_event.rb
...ab/geo/log_cursor/events/hashed_storage_migrated_event.rb
+2
-2
ee/lib/gitlab/geo/log_cursor/events/repository_deleted_event.rb
.../gitlab/geo/log_cursor/events/repository_deleted_event.rb
+2
-2
ee/lib/gitlab/geo/log_cursor/events/repository_renamed_event.rb
.../gitlab/geo/log_cursor/events/repository_renamed_event.rb
+2
-2
ee/lib/gitlab/geo/log_cursor/events/reset_checksum_event.rb
ee/lib/gitlab/geo/log_cursor/events/reset_checksum_event.rb
+2
-2
No files found.
ee/lib/gitlab/geo/log_cursor/events/base_event.rb
View file @
b15c90c7
...
@@ -23,7 +23,7 @@ module Gitlab
...
@@ -23,7 +23,7 @@ module Gitlab
end
end
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: enable CodeReuse/ActiveRecord
def
skippable
?
def
registry_exists
?
registry
.
new_record?
registry
.
new_record?
end
end
...
...
ee/lib/gitlab/geo/log_cursor/events/cache_invalidation_event.rb
View file @
b15c90c7
...
@@ -23,11 +23,11 @@ module Gitlab
...
@@ -23,11 +23,11 @@ module Gitlab
'Cache invalidation'
,
'Cache invalidation'
,
cache_key:
event
.
key
,
cache_key:
event
.
key
,
cache_expired:
expired
,
cache_expired:
expired
,
skippable:
skippable
?
skippable:
registry_exists
?
)
)
end
end
def
skippable
?
def
registry_exists
?
false
false
end
end
end
end
...
...
ee/lib/gitlab/geo/log_cursor/events/hashed_storage_migrated_event.rb
View file @
b15c90c7
...
@@ -10,7 +10,7 @@ module Gitlab
...
@@ -10,7 +10,7 @@ module Gitlab
def
process
def
process
return
unless
event
.
project_id
return
unless
event
.
project_id
job_id
=
hashed_storage_migrate
unless
skippable
?
job_id
=
hashed_storage_migrate
unless
registry_exists
?
log_event
(
job_id
)
log_event
(
job_id
)
end
end
...
@@ -34,7 +34,7 @@ module Gitlab
...
@@ -34,7 +34,7 @@ module Gitlab
new_storage_version:
event
.
new_storage_version
,
new_storage_version:
event
.
new_storage_version
,
old_disk_path:
event
.
old_disk_path
,
old_disk_path:
event
.
old_disk_path
,
new_disk_path:
event
.
new_disk_path
,
new_disk_path:
event
.
new_disk_path
,
skippable:
skippable
?
,
skippable:
registry_exists
?
,
job_id:
job_id
)
job_id:
job_id
)
end
end
end
end
...
...
ee/lib/gitlab/geo/log_cursor/events/repository_deleted_event.rb
View file @
b15c90c7
...
@@ -10,7 +10,7 @@ module Gitlab
...
@@ -10,7 +10,7 @@ module Gitlab
def
process
def
process
job_id
=
nil
job_id
=
nil
unless
skippable
?
unless
registry_exists
?
job_id
=
destroy_repository
job_id
=
destroy_repository
end
end
...
@@ -35,7 +35,7 @@ module Gitlab
...
@@ -35,7 +35,7 @@ module Gitlab
project_id:
event
.
project_id
,
project_id:
event
.
project_id
,
repository_storage_name:
event
.
repository_storage_name
,
repository_storage_name:
event
.
repository_storage_name
,
disk_path:
event
.
deleted_path
,
disk_path:
event
.
deleted_path
,
skippable:
skippable
?
,
skippable:
registry_exists
?
,
job_id:
job_id
)
job_id:
job_id
)
end
end
end
end
...
...
ee/lib/gitlab/geo/log_cursor/events/repository_renamed_event.rb
View file @
b15c90c7
...
@@ -10,7 +10,7 @@ module Gitlab
...
@@ -10,7 +10,7 @@ module Gitlab
def
process
def
process
return
unless
event
.
project_id
return
unless
event
.
project_id
job_id
=
rename_repository
unless
skippable
?
job_id
=
rename_repository
unless
registry_exists
?
log_event
(
job_id
)
log_event
(
job_id
)
end
end
...
@@ -31,7 +31,7 @@ module Gitlab
...
@@ -31,7 +31,7 @@ module Gitlab
project_id:
event
.
project_id
,
project_id:
event
.
project_id
,
old_path:
event
.
old_path_with_namespace
,
old_path:
event
.
old_path_with_namespace
,
new_path:
event
.
new_path_with_namespace
,
new_path:
event
.
new_path_with_namespace
,
skippable:
skippable
?
,
skippable:
registry_exists
?
,
job_id:
job_id
)
job_id:
job_id
)
end
end
end
end
...
...
ee/lib/gitlab/geo/log_cursor/events/reset_checksum_event.rb
View file @
b15c90c7
...
@@ -8,12 +8,12 @@ module Gitlab
...
@@ -8,12 +8,12 @@ module Gitlab
include
BaseEvent
include
BaseEvent
def
process
def
process
registry
.
reset_checksum!
unless
skippable
?
registry
.
reset_checksum!
unless
registry_exists
?
log_event
(
log_event
(
'Reset checksum'
,
'Reset checksum'
,
project_id:
event
.
project_id
,
project_id:
event
.
project_id
,
skippable:
skippable
?
)
skippable:
registry_exists
?
)
end
end
end
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