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
f49570aa
Commit
f49570aa
authored
Mar 22, 2018
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove disabled wikis from out-of-sync queries
parent
c2cb9a3d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
ee/app/workers/geo/project_sync_worker.rb
ee/app/workers/geo/project_sync_worker.rb
+10
-0
ee/spec/workers/geo/project_sync_worker_spec.rb
ee/spec/workers/geo/project_sync_worker_spec.rb
+4
-0
No files found.
ee/app/workers/geo/project_sync_worker.rb
View file @
f49570aa
...
...
@@ -20,8 +20,18 @@ module Geo
return
end
unflag_disabled_wiki
(
registry
)
Geo
::
RepositorySyncService
.
new
(
project
).
execute
if
registry
.
repository_sync_due?
(
scheduled_time
)
Geo
::
WikiSyncService
.
new
(
project
).
execute
if
registry
.
wiki_sync_due?
(
scheduled_time
)
end
private
def
unflag_disabled_wiki
(
registry
)
return
unless
registry
.
resync_wiki?
registry
.
update!
(
resync_wiki:
false
)
unless
registry
.
project
.
wiki_enabled?
end
end
end
ee/spec/workers/geo/project_sync_worker_spec.rb
View file @
f49570aa
...
...
@@ -117,6 +117,10 @@ RSpec.describe Geo::ProjectSyncWorker do
it
'does not sync the project wiki'
do
expect
(
wiki_sync_service
).
not_to
have_received
(
:execute
)
end
it
'unflags wiki for sync, to remove it from Geo wiki queries'
do
expect
(
registry
.
reload
.
resync_wiki
).
to
be_falsey
end
end
context
'when project repository was synced after the time the job was scheduled in'
do
...
...
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