Open
Description
I am trying to generate a continous event stream with this library.
I get this to work by using an endpoint which has to be called by the client which looks like:
@app.route('/api/get/statusupdate')
def status_update():
controller = TestController()
while True:
sse.publish(controller.get_status(), type='greeting')
time.sleep(5)
I am configuring the plugin with this:
app.config["REDIS_URL"] = "redis://localhost"
app.register_blueprint(sse, url_prefix='/stream')
Now I can call /stream in the client to listen to events, but I need to call /api/get/statusupdate
first which is a workaround. Is it possible to do this withiout calling /api/get/statusupdate
and directly output some data on the event endpoint?
Metadata
Metadata
Assignees
Labels
No labels