Reputation: 43
I have an apscheduler implementation which is able to run different kinds of tasks. These tasks might have different dependencies which needs to be installed when they are executed. The best was is to create a virtualenv install these respective dependencies taken from a resource file for each task and then may be release it when the task is done.
I have been trying to implement this but haven't had much success. The idea is probably to have a custom executer which can start a subprocess connected to separate python interpreter in a respective virtualenv and run the task there and get some results back. Note: I have only process pools for running tasks.
Does anybody have any idea how to proceed with this or any code snippets?
Upvotes: 1
Views: 177
Reputation: 5911
Nobody has asked for this yet, so I'd say you need to implement the custom executor you mentioned.
Upvotes: 1