Commit a2c1c1b
fix: Make from_memory_type and to_memory_type optional and add task_i… (#538)
fix: Make from_memory_type and to_memory_type optional and add task_id propagation
- Make from_memory_type and to_memory_type fields optional in ScheduleLogForWebItem
- This fixes RabbitMQ log submission validation errors in cloud service scenario
- Add task_id field to ScheduleMessageItem and ScheduleLogForWebItem
- Propagate task_id from API request through scheduler to web logs
- Add logging for preference memory additions in _pref_add_message_consumer
Fixes validation error:
'2 validation errors for ScheduleLogForWebItem
from_memory_type Field required
to_memory_type Field required'
Changes:
- src/memos/mem_scheduler/schemas/message_schemas.py: Add task_id fields
- src/memos/multi_mem_cube/single_cube.py: Pass task_id to ScheduleMessageItem
- src/memos/mem_scheduler/general_scheduler.py: Propagate task_id to logs
Co-authored-by: [email protected] <>1 parent bd53166 commit a2c1c1b
File tree
3 files changed
+53
-2
lines changed- src/memos
- mem_scheduler
- schemas
- multi_mem_cube
3 files changed
+53
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
| |||
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| 237 | + | |
236 | 238 | | |
237 | 239 | | |
238 | 240 | | |
| |||
798 | 800 | | |
799 | 801 | | |
800 | 802 | | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
801 | 847 | | |
802 | 848 | | |
803 | 849 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
126 | | - | |
127 | | - | |
| 128 | + | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| 430 | + | |
430 | 431 | | |
431 | 432 | | |
432 | 433 | | |
| |||
449 | 450 | | |
450 | 451 | | |
451 | 452 | | |
| 453 | + | |
452 | 454 | | |
453 | 455 | | |
454 | 456 | | |
| |||
489 | 491 | | |
490 | 492 | | |
491 | 493 | | |
| 494 | + | |
492 | 495 | | |
493 | 496 | | |
494 | 497 | | |
| |||
0 commit comments