Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start Python Celery task via Redis Pub/Sub

Is there an efficient way to start tasks via Redis Pub/Sub and return the value of the task back to a Pub/Sub channel to start another task based on the result?

Does anybody have an idea on how to put this together? Maybe decorators are a good idea to handle and prepare the return value back to a Pub/Sub channel without changing the code of the task too much.

Any help is very much appreciated!

like image 857
trbck Avatar asked Dec 04 '11 23:12

trbck


People also ask

What is Celery async?

Celery is a task queue/job queue based on asynchronous message passing. It can be used as a background task processor for your application in which you dump your tasks to execute in the background or at any given moment. It can be configured to execute your tasks synchronously or asynchronously.


1 Answers

The problem with using pub/sub is that it's not persistant. If you're looking to do closer to real time communication celery might not be your best choice.

like image 90
Jon Haddad Avatar answered Nov 06 '22 03:11

Jon Haddad