Commit b45fb99
fix: use async sessions for firmware database auto-save
- Changed from SessionLocal (sync) to AsyncSessionLocal (async)
- Updated auto-save logic in _download_worker to use async/await
- Uses sqlalchemy.select() for async query execution
- Properly handles async context manager for database operations
Also created .env.local with SQLite configuration for local development.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>1 parent 045d764 commit b45fb99
1 file changed
Lines changed: 8 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
177 | | - | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | | - | |
181 | | - | |
182 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
| |||
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | | - | |
| 203 | + | |
203 | 204 | | |
204 | | - | |
205 | | - | |
206 | 205 | | |
207 | 206 | | |
208 | 207 | | |
| |||
0 commit comments