Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Running a group signature #34

Open
satinfive opened this issue Dec 22, 2021 · 2 comments
Open

Running a group signature #34

satinfive opened this issue Dec 22, 2021 · 2 comments

Comments

@satinfive
Copy link

satinfive commented Dec 22, 2021

  • Celery Executor version: celery 4.3.0
  • Python version: 3.8
  • Operating System: Ubuntu 20.04

Description

Im trying to use group to execute a list of subtasks inside of a celery task.

What I Did

I tried lots of variants in order to catch the result from the group. Not sure if I am doing something wrong or not, but anyway, group execution doesnt work. I saw on previous issues that this was fixed but its not working for me; not sure if it is because i am not doing it correctly or if its not fixed.

tasks = [task.s(var1, var2) for var1 in vars1] group = group(tasks) group_result = addr_group().get()

and then getting:
TypeError: 'coroutine' object is not subscriptable

I tried using await, using apply_async, using delay, using a combination of all of them (await and apply_async), even iterating over the AsyncResult objects generated by group and trying to fetch the result using .get(), none of them worked. Its not allowed to use await, and everytime i try to get a result from the GroupResult or a single AsyncResult I got the error I reported above.

@satinfive
Copy link
Author

Ok, i resolved the issue myself.
Actually, this package supports group perfectly, but the code is in master and this is not released yet to pypi so if you install it through pypi it will not contain these changes to make group works.

Solution for now: install the package from the master branch in the repo instead of relying on pypi.

@satinfive satinfive reopened this Dec 24, 2021
@satinfive
Copy link
Author

It doesnt work.
It works fine to retrieve a GroupResult using await but it fails trying to get the results. It fails first because an async get_many is returned to the iter_native iterator from result_set module. If you use an async for to iterate over the async iterator, then it stalls exactly awaiting for the drain_events :/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant