Local evaluation with multiprocessing environment

Aperta
#77 0 commenti 1 reazione 2 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug

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?

Lingua principale
Python
Stelle
24
Fork
12
Merge medio
15h 43m
PR unite (30g)
4

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Flagsmith/flagsmith-python-client

Tutte le issue di Flagsmith/flagsmith-python-client

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.