Change cron worker to queue sub-workers
What does this MR do and why?
The current approach with the click_house_ci_finished_builds_sync_worker
(introduced in %16.5) doesn't allow for having multiple runners, even though it accepts arguments. In this MR, we're fixing this shortcoming by doing the following:
- Add a new
ClickHouse::CiFinishedBuildsSyncWorker
class that will perform the same work as the previous cronjob worker - Change the existing
ClickHouse::CiFinishedBuildsSyncCronWorker
so it takes a total number of workers and dispatches the appropriateClickHouse::CiFinishedBuildsSyncWorker
s; - Add a
version
value toClickHouse::CiFinishedBuildsSyncCronWorker
so that it ignores jobs that were queued without a version, as we don't really mind discarding those.
I didn't feel it was necessary to go through the process specified in https://docs.gitlab.com/ee/development/sidekiq/compatibility_across_updates.html#changing-the-arguments-for-a-worker since we haven't released the original worker yet.
EE: true
Part of #421201 (closed)
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Pedro Pombeiro