File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 33## Unreleased
44[ Check the diff] ( https://github.com/elastic/apm-agent-python/compare/v4.2.1...master )
55 * fixed an issue with Celery and the prefork worker pool (#444 )
6+ * fixed an issue when running uwsgi without a master process (#446 )
67
78## v4.2.1
89[ Check the diff] ( https://github.com/elastic/apm-agent-python/compare/v4.2.0...v4.2.1 )
Original file line number Diff line number Diff line change @@ -170,7 +170,17 @@ def multidict_to_dict(d):
170170
171171
172172try :
173- from uwsgidecorators import postfork
173+ import uwsgi
174+
175+ # check if a master is running before importing postfork
176+ if uwsgi .masterpid () != 0 :
177+ from uwsgidecorators import postfork
178+ else :
179+
180+ def postfork (f ):
181+ return f
182+
183+
174184except ImportError :
175185
176186 def postfork (f ):
You can’t perform that action at this time.
0 commit comments