mirror of https://github.com/dapr/quickstarts.git
Changed python code for pub sub
This commit is contained in:
parent
9646d122e8
commit
ed20d72e41
|
|
@ -11,6 +11,6 @@ logging.basicConfig(level = logging.INFO)
|
||||||
@app.subscribe(pubsub_name='order_pub_sub', topic='orders')
|
@app.subscribe(pubsub_name='order_pub_sub', topic='orders')
|
||||||
def mytopic(event: v1.Event) -> None:
|
def mytopic(event: v1.Event) -> None:
|
||||||
data = json.loads(event.Data())
|
data = json.loads(event.Data())
|
||||||
logging.info('Subscriber received: ' + data)
|
logging.info('Subscriber received: ' + str(data))
|
||||||
|
|
||||||
app.run(60002)
|
app.run(6002)
|
||||||
Loading…
Reference in New Issue