Commit 476ee659 authored by Xavier Barbosa's avatar Xavier Barbosa

update README

parent f5e5ec5a
Pipeline #478 passed with stages
......@@ -21,7 +21,7 @@ Publish message to a nsq:
from aionsq.http import NSQWriter
writer = NSQWriter('http://120.0.0.1:4567')
yield from writer.publish('test', 'hello world 2')
await writer.publish('test', 'hello world 2')
Connect directly to a nsq daemon:
......@@ -31,10 +31,10 @@ Connect directly to a nsq daemon:
reader = NSQReader('http://120.0.0.1:4567', 'topic1', 'chan1')
@reader.subscribe('test')
def consumer(msg):
async def consumer(msg):
msg.success()
yield from reader.start()
await reader.start()
Request nsq lookup:
......@@ -42,7 +42,7 @@ Request nsq lookup:
from aionsq import NSQLookup
lookup = NSQLookup('http://120.0.0.1:4567')
info = yield from lookup.info()
info = await lookup.info()
Start an authd::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment