mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
rrs_upstream_history.py: drop threading
This is never going to work, the only way we can practically do parallel execution is to run these things in a task which would basically amount to distrodata's do_checkpkg; we may move to that in future but for now just drop the threading code. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
687c2b0051
commit
0bab50462c
|
@ -86,13 +86,11 @@ def set_regexes(d):
|
||||||
d.getVar(var, True)))
|
d.getVar(var, True)))
|
||||||
break
|
break
|
||||||
|
|
||||||
def get_upstream_info(thread_worker, arg):
|
def get_upstream_info(layerbranch, recipe_data, result):
|
||||||
from bb.utils import vercmp_string
|
from bb.utils import vercmp_string
|
||||||
from oe.recipeutils import get_recipe_upstream_version, \
|
from oe.recipeutils import get_recipe_upstream_version, \
|
||||||
get_recipe_pv_without_srcpv
|
get_recipe_pv_without_srcpv
|
||||||
|
|
||||||
(layerbranch, recipe_data, result) = arg
|
|
||||||
|
|
||||||
pn = recipe_data.getVar('PN', True)
|
pn = recipe_data.getVar('PN', True)
|
||||||
recipe = Recipe.objects.get(layerbranch=layerbranch, pn=pn)
|
recipe = Recipe.objects.get(layerbranch=layerbranch, pn=pn)
|
||||||
if not recipe:
|
if not recipe:
|
||||||
|
@ -179,22 +177,9 @@ if __name__=="__main__":
|
||||||
|
|
||||||
history = RecipeUpstreamHistory(start_date = datetime.now())
|
history = RecipeUpstreamHistory(start_date = datetime.now())
|
||||||
|
|
||||||
from oe.utils import ThreadedPool
|
|
||||||
import multiprocessing
|
|
||||||
|
|
||||||
#nproc = min(multiprocessing.cpu_count(), len(recipes))
|
|
||||||
# XXX: The new tinfoil API don't support pythreads so
|
|
||||||
# set to 1 while tinfoil have support.
|
|
||||||
nproc = 1
|
|
||||||
pool = ThreadedPool(nproc, len(recipes))
|
|
||||||
|
|
||||||
result = []
|
result = []
|
||||||
for recipe_data in recipes:
|
for recipe_data in recipes:
|
||||||
pool.add_task(get_upstream_info, (layerbranch,
|
get_upstream_info(layerbranch, recipe_data, result)
|
||||||
recipe_data, result))
|
|
||||||
|
|
||||||
pool.start()
|
|
||||||
pool.wait_completion()
|
|
||||||
|
|
||||||
history.end_date = datetime.now()
|
history.end_date = datetime.now()
|
||||||
history.save()
|
history.save()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user