Local evaluation with multiprocessing environment

Offen
#77 0 Kommentare 1 Reaktion 2 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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?

Vorherrschende Sprache
Python
Sterne
24
Forks
12
Ø Merge
15 Std. 43 Min.
Gemergte PRs (30 T.)
4

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Flagsmith/flagsmith-python-client

Alle Issues in Flagsmith/flagsmith-python-client

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.