Run python script with multiple users accessing Django server
0
0
Entering edit mode
2.2 years ago
ramsha • 0

I have built a python script to run some process in downloading files and serve to users, I also built a website and added it to the Django framework, Now it is working properly for a single users (tested in the development environment, not a production environment). For example, If one user is using the website to request a particular file the background script runs properly and completes the task, and make files on the server... but if multiple users try to input the file at the same time, the backend python code is run but the Django produces an error.

Is there a way that each individual user will have a separate instance of the script running for them without interrupting the process of other users? In views.py file :

**def index(request):

if(request.method == "POST"):**

# here I call the function of other python files to run the script
       # the process may take like 15 - 30 sec based on internet speed
# return a FileResponce of the file to be served to the user
django python offtopic • 755 views
ADD COMMENT
0
Entering edit mode

This is something you should ask in a Django or Python forum (with your error's tracelog). Hth

ADD REPLY
0
Entering edit mode

This post does not fit the theme of this forum.

ADD REPLY

Login before adding your answer.

Traffic: 1590 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6