I
I
invilso2021-05-12 19:17:31
Django
invilso, 2021-05-12 19:17:31

How to make a thread in python that does not interfere with django?

I need an infinite loop regardless of django.
But when I run the function in which it is, it blocks django and cannot make requests to the server.
Tried to use asyncio, did not help.
Tried threads the same situation.
Are there any solutions to my problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Gornostaev, 2021-05-12
@invilso

Celery

@
@ugenk, 2021-05-12
_

RunScript from django-extensions

R
Roman Mirilaczvili, 2021-05-13
@2ord

As far as I understand, the GIL blocks execution because of the mutex.
Need to try with multiprocessing .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question