GithubHelp home page GithubHelp logo

Comments (8)

sdrabblescripta avatar sdrabblescripta commented on June 9, 2024 1

Python: 3.8
celery: 5.3.4 (emerald-rush)
d-c-r: 2.4.0

Please let me know what else you need.

from django-celery-results.

50-Course avatar 50-Course commented on June 9, 2024

Hi @sdrabblescripta,

Could you provide environment/OS configuration to help replicate the issue you are facing?

from django-celery-results.

sdrabblescripta avatar sdrabblescripta commented on June 9, 2024

@50-Course any update?

from django-celery-results.

50-Course avatar 50-Course commented on June 9, 2024

Hi @sdrabblescripta,

Unfortunately no. It's been a stretched week for me. However, I should be able to take a look at this over the weekend.

from django-celery-results.

sdrabblescripta avatar sdrabblescripta commented on June 9, 2024

No worries, any attention you can give the matter would be great!

from django-celery-results.

50-Course avatar 50-Course commented on June 9, 2024

@sdrabblescripta, Could you please provide a simplified information about your architecture? I would like to clarify if:

  • You do have two separate Django projects with their own Celery workers (queues A and B) and and a single shared RabbitMQ instance
  • Or could it be a single django application instance, with two celery clusters (A, B) and a single shared MQ instance?

from django-celery-results.

50-Course avatar 50-Course commented on June 9, 2024

That aside, chained tasks run sequentially, respecting the order of arrangement. To run tasks in parrallel, you would have to explictly call the group function, which returns a GroupResult instance that you may call your .get() on.

The difference here is in apply_async instead of the conventional wait() method.

from celery import group

# Assuming you have celery_worker_B and celery_worker_C configured
your_task_group = group(
    your_task.s(*args, **kwargs).set(queue='B'),
    your_task.s(*args, **kwargs).set(queue='C'),
    ...
)

# Apply the group of tasks asynchronously
result_group = your_task_group.apply_async()

Again if your have tried the above and still won't work out, please provide the above requirements to help diagnose the issue.

You may track the progress here upon providing the above: https://github.com/50-Course/dj-celery-results-multiple-worker-failure

from django-celery-results.

sdrabblescripta avatar sdrabblescripta commented on June 9, 2024

Hi @50-Course ,

I have two apps, A and B - they share some code but models are mostly NOT shared. There's a single A with its own celery worker, multiple Bs each with their own celery worker, and a single MQ.

A has to start a task in all B workers, which is why I thought group couldn't be used - the task is not importable in A, so I use send_task. If this is in error please let me know and I'll try the group approach.

from django-celery-results.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.