Ignore_user_abort php simil in Django / python?

Does anyone know how to set this behavior in Django / python? I need to send an Ajax request and save it if the user closes the page

+3
source share
1 answer

I think you want to use something like this: http://celeryproject.org/ Or just run the script in a separate thread, for example: subprocess.Popen ([sys.executable, '/ path / to / script.py'] )

0
source

Source: https://habr.com/ru/post/1790532/


All Articles