Allow configuring merge train concurrency
Currently the merge train concurrency is fixed at 20. Originally it was 4, then it was changed to be 4 or 20 depending on a feature flag, but now it is fixed at 20.
This should be user configurable. The code is in ee/app/services/merge_trains/refresh_service.rb:
class RefreshService
DEFAULT_CONCURRENCY = 20
...
def execute
...
train.all_cars(limit: DEFAULT_CONCURRENCY).each do |car|
Our current motivation is that we have a very heavy CI process on shared infrastructure, and the train gets derailed fairly regularly. Running 20 pipelines and restarting them kills our compute cluster, so we'd like to temporarily limit it to like 5, so that we are using fewer resources overall.