Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factor out django_utils.command #4139

Open
benjaoming opened this issue Jul 22, 2015 · 1 comment
Open

Factor out django_utils.command #4139

benjaoming opened this issue Jul 22, 2015 · 1 comment

Comments

@benjaoming
Copy link
Contributor

KA Lite should have a simple and unified mechanism for starting other processes. The django_utils.command is a mess.

We know that this stuff has attracted lots of problems, so let's assemble our best practices into one place and ensure stuff like #3704 and #4115 stops happening.

Cherrypy is running a thread pool while KA Lite is active.

The python-packages/fle_utils/django_utils/command.py is in a sad state, we could ideally abandon it in favor of a simple approach.

Let's discuss a simple and low-risk for 0.14.

One of the sad things in python-packages/fle_utils/django_utils/command.py is that it declares call_command_subprocess which uses the subprocess library and then REDECLARES call_command_subprocess as a function that uses multiprocessing :/

One much simpler approach would be to use normal threads that are signalled to shutdown by the main process in the same fashion that bin/kalite runs cronserver_blocking and tells it to exit. This reduces risks of process leaks clogging memory and leaked processes accessing the same files as newer processes.

@benjaoming
Copy link
Contributor Author

This can be fixed once #4892 is solved

@benjaoming benjaoming removed their assignment May 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant