fix: Avoid applying pinning optimization on RQ (#28896)

We only need it for gunicorn workers.
This commit is contained in:
Ankush Menat 2024-12-24 15:11:18 +05:30 committed by GitHub
parent aa5455e281
commit 8db2e1e2a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,6 +97,9 @@ def optimize_for_gil_contention():
if not os.environ.get("FRAPPE_PERF_PIN_WORKERS"):
return
if "gunicorn" not in str(sys.argv[0]):
return
if os.environ.get("FRAPPE_PERF_PIN_WORKERS_DETERMINISTIC"):
# Ensure same pinning order every time.
# This is only useful for benchmarking, DO NOT enable this in production.