Use replica database for Elastic::MigrationWorker
What does this MR do and why?
Related to #482440 (closed) and #429520 (closed)
This MR changes the Elastic::MigratioWorker (a cron worker) to use sticky for data consistency. This worker does not write to the database (only Elasticsearch indexes).
The worker cannot use delayed because cron workers have retries disabled.
This MR also cleans up some rubocop TODOs and speeds up tests considerably by moving elastic_clean trait to a single context vs. the whole spec.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
N/A - worker change only
How to set up and validate locally
N/A
Edited by Terri Chu