|
|
|
|
|
by keosak
4381 days ago
|
|
Points 1 and 2 are only valid because the Celery database backend implementation uses generic SQLAlchemy. Chances are, if you are using a relational database, it's PostgreSQL. And it does have an asynchronous notification system (LISTEN, NOTIFY), and this system allows you to specify which channel to listen/notify on. With the psycopg2 module, you can use this mechanism together with select(), so your worker thread(s) don't have to poll at all. They even have an example in the documentation. http://www.postgresql.org/docs/9.3/interactive/sql-notify.ht... http://initd.org/psycopg/docs/advanced.html#async-notify |
|