euscanwww: scan_upstream_all_task scans in randomized order

Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
volpino 2012-06-30 10:50:17 +02:00
parent c6f5fb0b7c
commit 145388a5e5

View File

@ -205,7 +205,11 @@ def scan_upstream_all_task(purge_versions=False):
Runs a parallel portage scan for all packages
"""
kwargs = {"purge_versions": purge_versions}
return _run_in_chunks(_scan_upstream_task, Package.objects.all(), kwargs)
return _run_in_chunks(
_scan_upstream_task,
Package.objects.all().order_by('?'),
kwargs
)
@task