Ver Fonte

Redis result backend: Adds the ability to wait for results without polling.

TODO Needs to document how one would do this.
Steeve Morin há 13 anos atrás
pai
commit
94edfbf0bb
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      celery/backends/redis.py

+ 1 - 0
celery/backends/redis.py

@@ -69,6 +69,7 @@ class RedisBackend(KeyValueStoreBackend):
         client.set(key, value)
         client.set(key, value)
         if self.expires is not None:
         if self.expires is not None:
             client.expire(key, self.expires)
             client.expire(key, self.expires)
+        client.publish(key, value)
 
 
     def delete(self, key):
     def delete(self, key):
         self.client.delete(key)
         self.client.delete(key)