Skip to content

Commit

Permalink
Updating Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermef committed Dec 28, 2020
1 parent b5a2f6f commit b5a38b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit b5a38b9

Please sign in to comment.