-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Line 47 is supposed to check if trailing chunks of batches are processed, but it lacks for proper coverage.
offchain/offchain/concurrency.py
Lines 42 to 53 in 85aa49f
| def batched_parmap(fn: Callable, args: list, batch_size: int = 10) -> list: # type: ignore[type-arg] # noqa: E501 | |
| results = [] | |
| i, j = 0, 0 | |
| while i < len(args): | |
| i, j = i + batch_size, i | |
| if len(args) > i: | |
| batch = args[j:i] | |
| else: | |
| batch = args[j:] | |
| res = parmap(fn, batch) | |
| results += res | |
| return results |
Metadata
Metadata
Assignees
Labels
No labels