I am starting a set of celery tasks by using celery group as described in the official documentation
I am also storing the group (taskset) id into a db, in order to poll celery for the taskset state.
job = group([
single_test.s(1, 1),
single_test.s(1, 2),
single_test.s(1, 3),
])
result = job.apply_async()
test_set = MyTestSet()
test_set.taskset_id = result.id
# store test_set into DB
Is there a way to obtain a GroupResult object (i.e. my result
) starting from the taskset id?
Something like what is done in this question, but working with celery groups.
I already tried doing:
r = GroupResult(taskset_id)
but it does not work, as r.results()
is always empty.
Should I use GroupResult.save()
and GroupResult.restore()
methods?