Skip to content

Commit

Permalink
Debug PRT - remove multi-threading from checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
tpapaioa committed Sep 18, 2024
1 parent b489874 commit fcd2261
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions broker/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,7 @@ def mp_split(*args, **kwargs):
if count is None:
return self.func(instance, *args, **kwargs)

results = []
max_workers_count = self.MAX_WORKERS or count
with self.EXECUTOR(max_workers=max_workers_count) as workers:
completed_futures = as_completed(
workers.submit(self.func, instance, *args, **kwargs) for _ in range(count)
)
for f in completed_futures:
results.extend(f.result())
return results
return [self.func(instance, *args, **kwargs) for _ in range(count)]

return mp_split

Expand Down Expand Up @@ -138,7 +130,7 @@ def _update_provider_actions(self, kwargs):
if key in kwargs:
self._provider_actions[key] = action

# @mp_decorator
@mp_decorator
def _checkout(self):
"""Checkout one or more VMs.
Expand Down

0 comments on commit fcd2261

Please sign in to comment.