Commit 4392586
authored
fix: drain non-empty buffers on ExtractionWorker shutdown (#78)
Short conversations that haven't hit the 800-token threshold would
silently lose their buffered extraction requests when shutdown()
cancelled the pending _debounced_process timers. Fix collects all keys
with pending requests before cancelling timers, then awaits
asyncio.gather over _process(key) for each — using the existing
semaphore — before clearing remaining state.1 parent 12da55b commit 4392586
1 file changed
Lines changed: 25 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
159 | 182 | | |
160 | 183 | | |
161 | 184 | | |
| |||
166 | 189 | | |
167 | 190 | | |
168 | 191 | | |
169 | | - | |
| 192 | + | |
170 | 193 | | |
171 | 194 | | |
0 commit comments