Fundamental question here:

right now we're doing a query to find all the sites just to figure out if there are 2 or more slots.

Couldn't we just assume that if the slots are not specified then we want to do a swap between staging and production ? Wouldnt these always be the first 2 slots to be created ?