Skip to content

Instantly share code, notes, and snippets.

@proteneer
proteneer / notify expiration
Created November 14, 2013 22:47
notify expires
import redis
import threading
class Listener(threading.Thread):
def __init__(self, r, channels):
threading.Thread.__init__(self)
self.redis = r
self.pubsub = self.redis.pubsub()
self.pubsub.subscribe(channels)