Commit 3051032b authored by Gabriel Mazetto's avatar Gabriel Mazetto

Change Geo notify_update to notify_project_update to be more specific

parent 61fb7906
...@@ -38,7 +38,7 @@ class PostReceive ...@@ -38,7 +38,7 @@ class PostReceive
end end
# Triggers repository update on secondary nodes when Geo is enabled # 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) if Gitlab::Git.tag_ref?(ref)
GitTagPushService.new.execute(project, @user, oldrev, newrev, ref) GitTagPushService.new.execute(project, @user, oldrev, newrev, ref)
......
...@@ -34,7 +34,7 @@ module Gitlab ...@@ -34,7 +34,7 @@ module Gitlab
GeoNode.where(host: host, port: port).exists? GeoNode.where(host: host, port: port).exists?
end end
def self.notify_update(project) def self.notify_project_update(project)
::Geo::EnqueueProjectUpdateService.new(project).execute ::Geo::EnqueueProjectUpdateService.new(project).execute
end end
......
...@@ -69,14 +69,14 @@ describe Gitlab::Geo, lib: true do ...@@ -69,14 +69,14 @@ describe Gitlab::Geo, lib: true do
end end
end end
describe 'notify_update' do describe 'notify_project_update' do
let(:project) { FactoryGirl.build(:project) } let(:project) { FactoryGirl.build(:project) }
it 'delegates to NotifyService' do it 'delegates to NotifyService' do
expect(Geo::EnqueueProjectUpdateService).to receive(:new).with(project).and_call_original expect(Geo::EnqueueProjectUpdateService).to receive(:new).with(project).and_call_original
expect_any_instance_of(Geo::EnqueueProjectUpdateService).to receive(:execute) expect_any_instance_of(Geo::EnqueueProjectUpdateService).to receive(:execute)
described_class.notify_update(project) described_class.notify_project_update(project)
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment