File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ def try_pick_some(
310310 return []
311311
312312 rusages = db .get_pkgs_last_rusage (ready_to_build )
313- ready_to_build .sort (key = lambda pkg : rusages .get (pkg ) and r .cputime or 3600 ) # type: ignore
313+ ready_to_build .sort (key = lambda pkg : ( r := rusages .get (pkg )) and r .cputime or 3600 )
314314 if cpu_ratio < 1.0 :
315315 # low cpu usage, build a big package
316316 ready_to_build .insert (0 , ready_to_build .pop ())
@@ -339,7 +339,7 @@ def try_pick_some(
339339 if not ret :
340340 if starving :
341341 ready_to_build .sort (
342- key = lambda pkg : rusages .get (pkg ) and r .memory or 10 * 1024 ** 3 , # type: ignore
342+ key = lambda pkg : ( r := rusages .get (pkg )) and r .memory or 10 * 1024 ** 3 ,
343343 )
344344 logger .info ('insufficient memory, starting only one build' )
345345 for pkg in ready_to_build :
You can’t perform that action at this time.
0 commit comments