Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_results(verbose=True) to show real time status of dispatcher delivering results #2

Open
BlakeERichey opened this issue Mar 2, 2024 · 0 comments

Comments

@BlakeERichey
Copy link
Owner

Can implement using tqdm and the following code snippet inside dispatcher.get_results

if task_ids is None:
      task_ids = list(self.tasks.keys())
    
    completed = deque()
    task_ids = deque(task_ids)
    with tqdm.trange(len(task_ids)) as pbar:
      pbar.set_description('Fecthing Tasks Results')
      while len(task_ids):
        task_id = task_ids[0]
        if self.tasks[task_id]['completed']:
          completed.append(task_ids.popleft())
          pbar.update(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant