few sort speedups

Fixes: https://pagure.io/koji/issue/963
This commit is contained in:
Tomas Kopecek 2018-06-06 13:43:37 +02:00 committed by Mike McLean
parent 088d500e0e
commit 17db100db5
5 changed files with 7 additions and 10 deletions

View file

@ -283,7 +283,8 @@ def send_queued_msgs(cbtype, *args, **kws):
for msg in msgs:
log.debug('test mode: skipped msg: %r', msg)
return
for url in sorted(urls, key=lambda k: random.random()):
random.shuffle(urls)
for url in urls:
container = Container(TimeoutHandler(url, msgs, CONFIG))
container.run()
if msgs: