Refactor LoadBalancing::LoadBalancer to support scoping it to different models

What does this MR do?

This changes Gitlab::Database::LoadBalancing::LoadBalancer so it no longer explicitly depends on ActiveRecord::Base, and instead allows you to change the scope using an argument passed to initialize. This is one of the building blocks needed to add support for multiple databases to our load balancer.

Does this MR meet the acceptance criteria?

Conformity

Edited by Yorick Peterse

Merge request reports

Loading