File tree 3 files changed +4
-3
lines changed
3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change
1
+ Fix GunicornWebWorker max_requests_jitter not work
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ async def _run(self) -> None:
110
110
self .notify ()
111
111
112
112
cnt = server .requests_count
113
- if self .cfg . max_requests and cnt > self . cfg .max_requests :
113
+ if self .max_requests and cnt > self .max_requests :
114
114
self .alive = False
115
115
self .log .info ("Max requests, shutting down: %s" , self )
116
116
Original file line number Diff line number Diff line change @@ -214,8 +214,8 @@ async def test__run_ok_parent_changed(
214
214
worker .sockets = [sock ]
215
215
worker .log = mock .Mock ()
216
216
worker .loop = loop
217
+ worker .max_requests = 0
217
218
worker .cfg .access_log_format = ACCEPTABLE_LOG_FORMAT
218
- worker .cfg .max_requests = 0
219
219
worker .cfg .is_ssl = False
220
220
221
221
await worker ._run ()
@@ -237,8 +237,8 @@ async def test__run_exc(
237
237
worker .sockets = [sock ]
238
238
worker .log = mock .Mock ()
239
239
worker .loop = loop
240
+ worker .max_requests = 0
240
241
worker .cfg .access_log_format = ACCEPTABLE_LOG_FORMAT
241
- worker .cfg .max_requests = 0
242
242
worker .cfg .is_ssl = False
243
243
244
244
def raiser () -> None :
You can’t perform that action at this time.
0 commit comments