diff --git a/sld-dashboard/app/home/routes.py b/sld-dashboard/app/home/routes.py index b264a01e..b389afe9 100644 --- a/sld-dashboard/app/home/routes.py +++ b/sld-dashboard/app/home/routes.py @@ -57,9 +57,10 @@ def deploy_stream(task_id): @login_required def stream(task_id): def generate(): - pubsub = s.pubsub() + pubsub = s.pubsub(ignore_subscribe_messages=True) pubsub.subscribe(f'{task_id}') for message in pubsub.listen(): + logging.info(message) yield f"data: {message['data']}\n\n" return Response(generate(), mimetype='text/event-stream') diff --git a/sld-dashboard/gunicorn-cfg.py b/sld-dashboard/gunicorn-cfg.py index 54e9f4c8..3dedc362 100644 --- a/sld-dashboard/gunicorn-cfg.py +++ b/sld-dashboard/gunicorn-cfg.py @@ -5,6 +5,7 @@ bind = "0.0.0.0:5000" workers = 10 +threads = 100 accesslog = "-" loglevel = "info" capture_output = True