James E. Blair 13c7c8bb7e Parallelize repo creation by org
This runs repo creation across two orgs at the same time.  It doesn't
help to parallelize more than 2 since openstack runs the entire time
in one thread (so the other thread handles all the other orgs).

Parallelizing by org avoids database contention for updating the user
table, since each org is a different user.  However, there's a weird
locking thing going on with the first update to the settings table,
so this does some extra work to serialize actions until we perform
that first update, then switches to parallel.

This is the maximum we can parallelize repo creation at the moment,
and it also maximizes settings updates (the settings updates take less
time than repo creation, so no further optimization helps).

Change-Id: I7f83dcdb4531a547ae5281434d7cda825dd50059
2019-07-16 14:24:44 -07:00
..