S
S
Sorin Ciobanu2018-02-24 22:27:36
Django
Sorin Ciobanu, 2018-02-24 22:27:36

How to implement background script execution in Django?

Good day.
In a Django application, you need to run a couple of modules in the background that need to run 24/24.
I thought to use Supervisord to permanently keep modules in the background, but when launched in this way, Django components do not start. If you use the django shell, there are moments with connecting third-party modules, for example

from autobahn.asyncio.wamp import ApplicationSession, ApplicationRunner
I receive here such error Though at a file call directly everything is launched perfectly. I would like to get a couple of ideas from you on how all this could be implemented. Or how to solve problems with connecting modules NameError: name 'ApplicationRunner' is not defined

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-02-24
@sergey-gornostaev

Django is synchronous, using its components in asynchronous code is extremely difficult, almost impossible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question