Tweaks to SSE

main
Charlotte Som 2023-07-06 21:32:53 +00:00
parent 3138e96ae0
commit 2546b1c559
2 changed files with 14 additions and 8 deletions

View File

@ -7,18 +7,24 @@ server {
ssl_certificate /etc/letsencrypt/live/demucs.stems.zip/fullchain.pem; ssl_certificate /etc/letsencrypt/live/demucs.stems.zip/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/demucs.stems.zip/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/demucs.stems.zip/privkey.pem;
location / { location / {
proxy_pass http://127.0.0.2:8000/; proxy_pass http://127.0.0.2:8000/;
} }
location = /demix {
client_max_body_size 4G;
proxy_pass http://127.0.0.2:8000/demix;
}
location = /sse {
proxy_read_timeout 300;
proxy_send_timeout 300;
proxy_buffering off;
proxy_pass http://127.0.0.2:8000/sse;
}
location ^~ /uploads/ { location ^~ /uploads/ {
gzip on; gzip on;
alias /path/to/demucs-server/src/uploads/; alias /path/to/demucs-server/src/uploads/;
} }
location = /sse {
proxy_read_timeout 300;
proxy_send_timeout 300;
proxy_pass http://127.0.0.2:8000/;
}
} }

View File

@ -12,7 +12,7 @@
<p>status: <strong class="status">{{ status }}</strong></p> <p>status: <strong class="status">{{ status }}</strong></p>
<p>originally: <strong>{{ orig_name }}</strong></p> <p>originally: <strong>{{ orig_name }}</strong></p>
<section class="progress-section" {% if status !="in progress" %}style="display: none" {% endif %}> <section class="progress-section" {% if progress.get('stage') is None %}style="display: none" {% endif %}>
<h3>progress</h3> <h3>progress</h3>
<p> <p>
stage: stage: