Commit 0752a37
UN-3211 [FEAT] HTTP session lifecycle management for workers API clients
- Add _owns_session flag to prevent singleton shared session from being
closed by individual clients
- Wire API_CLIENT_POOL_SIZE into HTTPAdapter connection pools
- Add idempotent close() and __del__ destructor to BaseAPIClient
- Add try/finally cleanup in api-deployment and callback tasks
- Add on_worker_process_shutdown hook and early-return guard in postrun
- Add 25 unit tests for session lifecycle behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 38b3ce1 commit 0752a37
10 files changed
Lines changed: 1028 additions & 310 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
174 | | - | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| |||
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | 237 | | |
246 | 238 | | |
247 | 239 | | |
248 | 240 | | |
249 | 241 | | |
250 | 242 | | |
251 | | - | |
| 243 | + | |
252 | 244 | | |
253 | 245 | | |
254 | 246 | | |
| |||
261 | 253 | | |
262 | 254 | | |
263 | 255 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | 256 | | |
278 | 257 | | |
279 | 258 | | |
280 | 259 | | |
281 | 260 | | |
282 | 261 | | |
283 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
284 | 279 | | |
285 | 280 | | |
286 | 281 | | |
| |||
0 commit comments