Move ProcessScanResultPolicyWorker for multiple projects into a new worker
Description
!114113 (merged) increased the latency of AuthorizedProjectsWorker and caused QA test to fail #402400 (closed). It also caused sidekiq thread contention https://gitlab.com/gitlab-com/gl-infra/capacity-planning/-/issues/943 This is because of iteration of projects from project_ids in RefreshAuthorizedProjectsService adds substantial delay (all_security_orchestration_policy_configurations precisely)
Implementation Plan
-
backend Create a new sidekiq worker that takes a list of project_ids and calls Security::ProcessScanResultPolicyWorkerfor each projects -
backend Use the worker in RefreshAuthorizedProjectsServiceandAuthorizedProjectUpdate::ProjectRecalculateService
Edited by Sashi Kumar Kumaresan