File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/DIRAC/ConfigurationSystem/private Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
import time
2
2
3
3
from DIRAC .ConfigurationSystem .Client .ConfigurationData import gConfigurationData
4
- from DIRAC .ConfigurationSystem .Client .PathFinder import getGatewayURLs
4
+ from DIRAC .ConfigurationSystem .Client .PathFinder import getGatewayURLs , groupURLsByPriority
5
5
from DIRAC .Core .Utilities import List
6
6
from DIRAC .Core .Utilities .EventDispatcher import gEventDispatcher
7
7
from DIRAC .Core .Utilities .ReturnValues import S_ERROR , S_OK
@@ -138,7 +138,9 @@ def _refresh(self, fromMaster=False):
138
138
if not initialServerList :
139
139
return S_OK ()
140
140
141
- randomServerList = List .randomize (initialServerList )
141
+ randomServerList = []
142
+ for urlGroup in groupURLsByPriority (initialServerList ):
143
+ randomServerList .extend (List .randomize (urlGroup ))
142
144
gLogger .debug (f"Randomized server list is { ', ' .join (randomServerList )} " )
143
145
144
146
for sServer in randomServerList :
You can’t perform that action at this time.
0 commit comments