From b5a38b944a7ec36fbdb7cf598b0363ded0605b43 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Mon, 28 Dec 2020 16:31:55 +0100 Subject: [PATCH] Updating Readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b07c485..e951ddc 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ Install it(duh!): pip install tornado_eventsource +[Client/Server example](https://github.com/guilhermef/tornado-eventsource/tree/master/example) + On your handler: class MyAmazingHandler(EventSourceHandler): @@ -56,8 +58,7 @@ Another example: class MainHandler(tornado_eventsource.handler.EventSourceHandler): def open(self): - ioloop = tornado.ioloop.IOLoop.instance() - self.heart_beat = tornado.ioloop.PeriodicCallback(self._simple_callback, 5000, ioloop) + self.heart_beat = tornado.ioloop.PeriodicCallback(self._simple_callback, 5000) self.heart_beat.start() self.write_message(msg="Wow much nameless", evt_id=uuid.uuid4()) print('Connection open')