Flagsmith / Flagsmith/flagsmith-python-client

Local evaluation with multiprocessing environment

Đang mở
#77 0 bình luận 1 reaction 2 người được giao Được giao cho @khvn26 Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
24
Fork
12
Merge trung bình
15 giờ 43 phút
Pull request đã merge (30 ngày)
4

Mô tả

## 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](https://docs.gunicorn.org/en/stable/design.html#server-model)). 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](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Manager) or a redis?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.