Revert "project: print logs from the correct job"
This reverts commit 040dd57ad0
.
Parallel updates are a great feature, but they break color.ui and
attempts to fix that have caused unexpected exceptions to be thrown on
Windows, so we need to back the feature out for now until we can get
it done in a way that works with both color and Windows.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
11f63a5d9d
commit
89104b0974
|
@ -859,7 +859,7 @@ class Update(_ProjectCommand):
|
|||
|
||||
@staticmethod
|
||||
def _update_concurrent_thread(args):
|
||||
index, project, self, logdir = args
|
||||
project, self, logdir = args
|
||||
if logdir:
|
||||
saved_stdout = os.dup(sys.stdout.fileno())
|
||||
saved_stderr = os.dup(sys.stderr.fileno())
|
||||
|
@ -873,9 +873,9 @@ class Update(_ProjectCommand):
|
|||
|
||||
try:
|
||||
self.update(project)
|
||||
return (index, True)
|
||||
return True
|
||||
except subprocess.CalledProcessError:
|
||||
return (index, False)
|
||||
return False
|
||||
finally:
|
||||
if logdir:
|
||||
sys.stdout.flush()
|
||||
|
@ -903,12 +903,13 @@ class Update(_ProjectCommand):
|
|||
log.dbg(f"log directory: {logdir_name}")
|
||||
|
||||
args = []
|
||||
for index, project in enumerate(projects):
|
||||
args.append((index, project, self, logdir_name))
|
||||
for project in projects:
|
||||
args.append((project, self, logdir_name))
|
||||
|
||||
with multiprocessing.Pool(self.args.jobs) as p:
|
||||
for index, successful in p.imap_unordered(
|
||||
self._update_concurrent_thread, args):
|
||||
for index, successful in enumerate(
|
||||
p.imap_unordered(self._update_concurrent_thread,
|
||||
args)):
|
||||
project = projects[index]
|
||||
|
||||
if logdir:
|
||||
|
|
Loading…
Reference in New Issue