Explorar el Código

populate the stream with an initial entry

Chris Mague hace 6 años
padre
commit
be6cadefe5
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      example.py

+ 1 - 0
example.py

@@ -15,6 +15,7 @@ pool = redis.ConnectionPool(host=redis_host, port=redis_port)
 r = redis.Redis(connection_pool=pool)
 
 try:
+    r.xadd("mystream",  {'event_type': 'startup', 'user': 'root'})
     r.xgroup_create("mystream", "consumerGroup", '$')
 except:
     print("group already exists")