Remove an extra query when sync maven metadata
Problem
In the method sync_maven_metadata
we do a database call to the projects
table to fetch a project's id. We could skip it by accessing project_id
from the packages_packages
column.
Solution
Replace project.id
with project_id
when calling a background worker https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/models/packages/package.rb#L367