fix: gunicorn with 5min timeout instead of Flask dev server
Deploy contracts-flask / validate (push) Successful in 0s
Deploy contracts-flask / validate (push) Successful in 0s
This commit is contained in:
+1
-1
@@ -10,4 +10,4 @@ COPY site /app/site
|
|||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
CMD ["python", "site/app.py"]
|
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--timeout", "300", "--workers", "1", "site.app:app"]
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ BTN.onclick = async () => {
|
|||||||
const fd = new FormData(); files.forEach(f => fd.append('files', f));
|
const fd = new FormData(); files.forEach(f => fd.append('files', f));
|
||||||
try {
|
try {
|
||||||
setStatus('progress', '⏳ Обработка (может занять до минуты)...');
|
setStatus('progress', '⏳ Обработка (может занять до минуты)...');
|
||||||
const r = await fetch('/api/drhider', { method:'POST', body:fd, signal:AbortSignal.timeout(300000) });
|
const r = await fetch('/api/drhider', { method:'POST', body:fd });
|
||||||
if (!r.ok) {
|
if (!r.ok) {
|
||||||
const txt = await r.text();
|
const txt = await r.text();
|
||||||
throw new Error(txt);
|
throw new Error(txt);
|
||||||
|
|||||||
Reference in New Issue
Block a user