Questions: Is there a way to gather results return by promises passed into a barrier?

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

No source file or test is named. Start by reading the current barrier and promise APIs, then trace how barrier(requests).then(gather_results) passes completion values. Done would be an established answer about whether the current interface gathers results, or a clearly scoped API change if it does not.

Written by the indexing model from the issue text.

Description

I'd like to gather results returned by promises that are passed into a barrier, I imagined an interface like this:

        p1 = http.Request('http://a')
        p2 = http.Request('http://b')
        p3 = http.Request('http://c')
        requests = [p1, p2, p3]
        def gather_results(*res): # 
            pass  # all requests complete
        b = barrier(requests).then(gather_results)

Can this be achieved by using the current interface?

Thank you very much

Dominant language
Python
Stars
129
Forks
48
Avg merge
13h 35m
Merged PRs (30d)
4

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from celery/vine

All issues in celery/vine

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.