Redis
 sql >> Datenbank >  >> NoSQL >> Redis

Zerstören/Entfernen einer Queue() in Redis Queue (rq) programmgesteuert

Versuchen Sie Folgendes (Sie können dies alles mit redis-cli validieren):

yesterday.empty()  # This will wipe out rq:queue:yesterday and all of its contents
del(yesterday)  # Deletes the variable itself
r = Redis()
r.srem('rq:queues', 'rq:queue:yesterday')  # Removed the entry from rq:queues set. The library unfortunately doesn't seem to clean this up by itself.