Recommandation for using RQ with fork unsafe libraries #1766
Replies: 1 comment 1 reply
-
@stripedpumpkin I don't have an easy solution, I'm not particular familiar with how You could customize the Lines 795 to 807 in c5a7a6b I think you could get way with doing something similar, but instead of forking, creating a process manually. You might need to pass some things that are on the parent process manually though: I found this article interesting when reading about this specific topic. You would probably also need to handle this method: Lines 919 to 935 in c5a7a6b To be honest, I'm not sure if that would work at all, but might be worth the shot. |
Beta Was this translation helpful? Give feedback.
-
Hello. I was wondering what the recommandation would be to use RQ with fork unsafe libraries such as PyMongo (https://pymongo.readthedocs.io/en/stable/faq.html#is-pymongo-fork-safe).
The use case would be the following: accessing a mongo database within the execution of an RQ job.
In the current case:
(If it matters this setup would happen in the context of Django app.)
Would you recommend using another parallelization mechanism ? If so what would be the go to reference and how to set this up ?
Thanks for reading
Beta Was this translation helpful? Give feedback.
All reactions