Remove tracking registry when project gets deleted on primary node

parent dba11e92
......@@ -52,6 +52,7 @@ module Projects
flush_caches(project, wiki_path)
trash_repositories!
remove_tracking_registry!
log_info("Project \"#{project.name}\" was removed")
end
......@@ -98,6 +99,12 @@ module Projects
project.container_registry_repository.delete_tags
end
def remove_tracking_registry!
return unless Gitlab::Geo.secondary?
Geo::ProjectRegistry.where(project_id: project.id).delete_all
end
def raise_error(message)
raise DestroyError.new(message)
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