1

Let's say I have two python packages

  1. producer
  2. consumer

they live in a different repositories (and running on separate servers)

I would like to use Celery implement some background tasks so that producer will create tasks and consumer will execute them

Now, celery seems done that way that tasks code must be shared between consumer and producer...

Is there a way to make it possible to start celery task from producer so that producer never knows the actual source code of the consumer ?

Djangonaut
  • 5,511
  • 7
  • 40
  • 53

1 Answers1

1

Yes, using send_task() - I have already answered similar questions here before. The beauty of this function is that all you need to know are task names, and their parameters, and you need, naturally to have the same configuration (broker, serialization, etc).

DejanLekic
  • 18,787
  • 4
  • 46
  • 77