skip to Main Content

Reactjs – Prevent fetch making unwanted requests

fetch is making multiple unwanted requests, I tried the below but it still makes 6 to 10 requests const [allowParse, setAllowParse] = useState<boolean>(true); socket.on("upload_finished", function (response) { if (allowParse === true) { console.log("parse start"); fetch("start-parse", {method: "POST"}); setAllowParse(false) } });…

VIEW QUESTION

Redis – flask-socketio in kubernetes, ingress and multiple replicas

i'm running a flask-socketio behind an ingress. here's the config: socketio = SocketIO(app, message_queue='redis://redis-server.domain:6379') in the dockerfile, it runs like so: CMD ["gunicorn", "-k", "geventwebsocket.gunicorn.workers.GeventWebSocketWorker", "-w", "4", "--bind", "0.0.0.0:2731", "app:app"] and the ingress is configured like this: nginx.ingress.kubernetes.io/affinity: "cookie" nginx.ingress.kubernetes.io/enable-ssl-passthrough:…

VIEW QUESTION
Back To Top
Search