[Python] Can I send the computed result in the background task in Django to the frontend...

Discussão em 'Python' iniciado por Stack, Março 22, 2025.

  1. Stack

    Stack Membro Participativo

    In the Django view, I have used the multiprocessing module of python and have successfully made parallel requests to Julia's server using the map function of the multiprocessing module. The result is automatically given as a list to the view and I return the results list to Frontend using HTTP response.

    However, Julia takes nearly 10 minutes to compute 1 task and even after parallel processing it consumes a lot of time and the frontend has to wait way too long for the final response to come through.

    So for each call to Julia, I need to send the computed result back to the frontend so it can start working on this data.

    I do not want to use Celery. Any ideas on how to send HTTP requests to the frontend from the subprocesses themselves?

    Continue reading...

Compartilhe esta Página