def heartbeat(self):
while not self.ws.closed:<EOL><INDENT>gevent.sleep(HEARTBEAT_DELAY)<EOL>gevent.spawn(self.send, "<STR_LIT>")<EOL><DEDENT>
Send a ping to the websocket periodically.

        This is needed so that Heroku won't close the connection
        from inactivity.