Use Gitlab::Utils::Override to mark the method as overridden

parent 6b6e3007
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
module Geo module Geo
class RepositoryUpdatedEvent < ApplicationRecord class RepositoryUpdatedEvent < ApplicationRecord
extend ::Gitlab::Utils::Override
include Geo::Model include Geo::Model
include Geo::Eventable include Geo::Eventable
...@@ -25,15 +26,13 @@ module Geo ...@@ -25,15 +26,13 @@ module Geo
REPOSITORY_TYPE_MAP[repository.repo_type] REPOSITORY_TYPE_MAP[repository.repo_type]
end end
override :consumer_klass_name
def consumer_klass_name def consumer_klass_name
klass = if design?
if design? ::Gitlab::Geo::LogCursor::Events::DesignRepositoryUpdatedEvent.name.demodulize
::Gitlab::Geo::LogCursor::Events::DesignRepositoryUpdatedEvent else
else super
self.class end
end
klass.name.demodulize
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