Commit 04b1007
authored
feat: Pass source_doc_id in task completion logs (#664)
This commit addresses the issue where 'source_doc_id' was not being propagated
in task completion (success/failure) logs emitted by the scheduler dispatcher.
Changes made:
- Added 'source_doc_id: str | None' field to the 'ScheduleLogForWebItem' schema
in 'src/memos/mem_scheduler/schemas/message_schemas.py'.
- Modified '_maybe_emit_task_completion' in
'src/memos/mem_scheduler/task_schedule_modules/dispatcher.py' to:
- Extract 'source_doc_id' from 'ScheduleMessageItem.info'.
- Pass 'source_doc_id' to the 'ScheduleLogForWebItem' constructor for both
'completed' and 'failed' task status events.
This ensures better traceability and debugging for task completion events
related to specific source documents.
Co-authored-by: [email protected] <>1 parent b6efb0c commit 04b1007
File tree
2 files changed
+18
-2
lines changed- src/memos/mem_scheduler
- schemas
- task_schedule_modules
2 files changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| |||
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
299 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
300 | 312 | | |
301 | 313 | | |
302 | 314 | | |
| |||
311 | 323 | | |
312 | 324 | | |
313 | 325 | | |
| 326 | + | |
314 | 327 | | |
315 | 328 | | |
316 | 329 | | |
| |||
332 | 345 | | |
333 | 346 | | |
334 | 347 | | |
| 348 | + | |
335 | 349 | | |
336 | 350 | | |
337 | 351 | | |
| |||
355 | 369 | | |
356 | 370 | | |
357 | 371 | | |
| 372 | + | |
358 | 373 | | |
359 | 374 | | |
360 | 375 | | |
| |||
0 commit comments