diff options
| author | Martin Pitt <martin.pitt@ubuntu.com> | 2016-11-30 09:14:49 (GMT) |
|---|---|---|
| committer | Martin Pitt <martin.pitt@ubuntu.com> | 2016-11-30 09:14:49 (GMT) |
| commit | 38331c76800f90559b43773b3319a41c77ecf4ae (patch) | |
| tree | 95108c43500ce9f53161a1f9bbaa20beb1bd9fe4 | |
| parent | 06d9a646e2e066b72debb02654ad3a7016a96e94 (diff) | |
worker: shuffle architecture list
Right now the workers are lopsided to draining the i386 queues much faster,
presumably because it occurs first in the config's "architectures" list and the
order in which it connects to the queues matters.
| -rwxr-xr-x | worker/worker | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/worker/worker b/worker/worker index c910c84..1e3eeac 100755 --- a/worker/worker +++ b/worker/worker @@ -19,6 +19,7 @@ import json import urllib.request import re import hashlib +import random import amqplib.client_0_8 as amqp import swiftclient @@ -487,6 +488,9 @@ def amqp_connect(cfg, callback): logging.info('No architectures in configuration, defaulting to %s', my_arch) arches = [my_arch] + # avoid preferring the same architecture on all workers + random.shuffle(arches) + for release in cfg.get('autopkgtest', 'releases').split(): for context in ['', 'ppa-', 'upstream-']: for arch in arches: |
