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
3051032b
Commit
3051032b
authored
Mar 14, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change Geo notify_update to notify_project_update to be more specific
parent
61fb7906
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/workers/post_receive.rb
app/workers/post_receive.rb
+1
-1
lib/gitlab/geo.rb
lib/gitlab/geo.rb
+1
-1
spec/lib/gitlab/geo_spec.rb
spec/lib/gitlab/geo_spec.rb
+2
-2
No files found.
app/workers/post_receive.rb
View file @
3051032b
...
...
@@ -38,7 +38,7 @@ class PostReceive
end
# Triggers repository update on secondary nodes when Geo is enabled
Gitlab
::
Geo
.
notify_update
(
project
)
if
Gitlab
::
Geo
.
enabled?
Gitlab
::
Geo
.
notify_
project_
update
(
project
)
if
Gitlab
::
Geo
.
enabled?
if
Gitlab
::
Git
.
tag_ref?
(
ref
)
GitTagPushService
.
new
.
execute
(
project
,
@user
,
oldrev
,
newrev
,
ref
)
...
...
lib/gitlab/geo.rb
View file @
3051032b
...
...
@@ -34,7 +34,7 @@ module Gitlab
GeoNode
.
where
(
host:
host
,
port:
port
).
exists?
end
def
self
.
notify_update
(
project
)
def
self
.
notify_
project_
update
(
project
)
::
Geo
::
EnqueueProjectUpdateService
.
new
(
project
).
execute
end
...
...
spec/lib/gitlab/geo_spec.rb
View file @
3051032b
...
...
@@ -69,14 +69,14 @@ describe Gitlab::Geo, lib: true do
end
end
describe
'notify_update'
do
describe
'notify_
project_
update'
do
let
(
:project
)
{
FactoryGirl
.
build
(
:project
)
}
it
'delegates to NotifyService'
do
expect
(
Geo
::
EnqueueProjectUpdateService
).
to
receive
(
:new
).
with
(
project
).
and_call_original
expect_any_instance_of
(
Geo
::
EnqueueProjectUpdateService
).
to
receive
(
:execute
)
described_class
.
notify_update
(
project
)
described_class
.
notify_
project_
update
(
project
)
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