Flagsmith / Flagsmith/flagsmith-python-client

Local evaluation with multiprocessing environment

オープン
#77 コメント 0 件 リアクション 1 件 担当者 2 名 @khvn26 に割り当て済み GitHub で見る
bug
主要言語
Python
スター
24
フォーク
12
平均マージ
15時間 43分
マージ済み PR(30日)
4

説明

## 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?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。