getting celery group results
<p>So this is what i want to do. I have a scheduled task that runs every X minutes. In the task I create a group of tasks that i want them to run parallel to each other. After they all finish i want to log if the group has finished successfully or not. This is my code:</p>

<pre><code>@shared_task(base=HandlersImplTenantTask, acks_late=True)
def my_scheduled_task():
    try:
        needed_ids = MyModel.objects.filter(some_field=False)\
                                .filter(some_other_field=True)\
                                .values_list("id", flat=True) \
                                .order_by("id")
        if needed_ids:
            tasks = [my_single_task.s(needed_id=id) for id in needed_ids]
            job = group(tasks)
            result = job.apply_async()
            returned_values = result.get()
            if result.ready():
                if result.successful():
                    logger.info("SUCCESSFULLY FINISHED ALL THE SUBTASKS")
                else:
                    returned_values = result.get()
                    logger.info("UNSUCCESSFULLY FINISHED ALL THE SUBTASKS WITH THE RESULTS %s" % returned_values)
        else:
            logger.info("no needed ids found")
    except:
        logger.exception("got an unexpected exception while running task")
</code></pre>

<p>This is my_single_task code:</p>

<pre><code>@shared_task(base=HandlersImplTenantTask)
def my_single_task(needed_id):

    logger.info("starting task for tenant: [%s]. got id [%s]", connection.tenant, needed_id)
    return
</code></pre>

<p>This is how i run my celery:
manage.py celery worker -c 2 --broker=[my rabbitmq brocker url]</p>

<p>when i get to the line <code>result.get()</code> it hangs. i see a single log entry of the single tasks with the first id but i don't see the others. when i kill my celery process and restart it - it reruns the scheduled task and i see the second log entry with the second id (from the first time the task ran). any ideas on how to fix this?</p>

<p><strong>EDIT</strong> - so to try and overcome this - I created a different queue called 'new_queue'. I started a different celery worker to listen to the new queue. I want to make the other worker take the tasks and work on them. I think this could solve the problem of the deadlock. 
I have changed my code to look like this:</p>

<pre><code>job = group(tasks)
job_result = job.apply_async(queue='new_queue')
results = job_result.get()
</code></pre>

<p>but I still get a deadlock and if i remove the <code>results = job_result.get()</code> line, i can see that the tasks are worked on by the main worker and nothing was published to the new_queue queue. Any thoughts?
This is my celery configurations:
<code>tenant_celery_app.conf.update(CELERY_RESULT_BACKEND='djcelery.backends.database.DatabaseBackend'
CELERY_RESULT_DB_TABLENAMES = {
    'task': 'tenantapp_taskmeta',
    'group': 'tenantapp_groupmeta',
}</code><br/>
This is how i run the workers:<br/>
celery worker -c 1 -Q new_queue --broker=[amqp_brocker_url]/[vhost]<br/>
celery worker -c 1 --broker=[amqp_brocker_url]/[vhost]</p>