Created
December 22, 2020 13:49
-
-
Save wh13371/0da973d544f7d394e179a413f5771a5a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def start_redis_consumer(): | |
dd("Starting Redis Consumer") | |
while True: | |
events = r.xread({REDIS_STREAM: '$'}, block=0, count=None) | |
for _, data in events: | |
stream = _ | |
_redisid = data[0][0] | |
_redisdata = data[0][1] | |
# do something with "stream" , "_redisid" and "_redisdata" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment