Skip to content

Instantly share code, notes, and snippets.

View dpnkrg's full-sized avatar
🏠
Working from home

Deepankar Gupta dpnkrg

🏠
Working from home
View GitHub Profile
@dpnkrg
dpnkrg / pub_sub_redis.py
Created October 30, 2018 12:23 — forked from bamthomas/pub_sub_redis.py
Pub/Sub redis python
from multiprocessing.process import Process
import time
import redis
def pub(myredis):
for n in range(10):
myredis.publish('channel','blah %d' % n)
time.sleep(5)
def sub(myredis, name):