• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ghiggi / gpm_api / 7798551251

06 Feb 2024 10:55AM UTC coverage: 59.56%. Remained the same
7798551251

push

github

ghiggi
Fix documentation

3305 of 5549 relevant lines covered (59.56%)

0.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/gpm_api/utils/parallel.py
1
#!/usr/bin/env python3
2
"""
×
3
Created on Wed Aug  2 18:15:57 2023
4

5
@author: ghiggi
6
"""
7
import dask
×
8

9

10
def compute_list_delayed(list_delayed, max_concurrent_tasks=None):
×
11
    """
12
    Compute the list of Dask delayed objects in blocks of max_concurrent_tasks.
13

14
    Parameters:
15
    list_results (list): List of Dask delayed objects.
16
    max_concurrent_task (int): Maximum number of concurrent tasks to execute.
17

18
    Returns:
19
    list: List of computed results.
20
    """
21
    if max_concurrent_tasks is None:
×
22
        computed_results = dask.compute(*list_delayed)
×
23
    else:
24
        computed_results = []
×
25
        for i in range(0, len(list_delayed), max_concurrent_tasks):
×
26
            subset_delayed = list_delayed[i : (i + max_concurrent_tasks)]
×
27
            computed_results.extend(dask.compute(*subset_delayed))
×
28

29
    return computed_results
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc