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

Local evaluation with multiprocessing environment #77

Open
andreamouraud opened this issue Mar 5, 2024 · 0 comments
Open

Local evaluation with multiprocessing environment #77

andreamouraud opened this issue Mar 5, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@andreamouraud
Copy link

What

When running the client with local evaluation in a gunicorn server (or any multiprocessed environment), the workers environment is never updated

Why

Gunicorn is designed around the pre-fork worker model (see docs). When instantiating the Flagsmith client, the polling updates the _environment variable in the master worker, but these changes will not affect the other workers. We would need to run a polling thread for each worker, which is not ideal

Sharing the _environment between workers

Would you be open to a new feature that would allow pickling and sharing the data between processes using a multiprocessing.Manager or a redis?

@dabeeeenster dabeeeenster added the bug Something isn't working label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants