Commit e9d31cd
committed
feat: Refactor task ID handling for clarity and correctness
This commit refactors the handling of task IDs throughout the system to ensure
consistency and correctness, addressing previous ambiguities and potential issues.
Key changes include:
- Streamlining the ScheduleMessageItem to use a single 'task_id' field,
representing the business-level identifier, thereby removing redundancy and
Pydantic field clashes.
- Modifying the /product/add API endpoint to correctly distinguish between the
internal item_id (UUID) and the business-level task_id provided in the request,
ensuring proper tracking in the status monitoring system.
- Propagating the task_id consistently through MOSProduct, MOSCore, and
SingleCubeView components, ensuring it reaches the ScheduleMessageItem.
- Verifying that both the Redis-based status monitoring and the web logging
systems correctly receive and utilize the business-level task_id, eliminating
race conditions and ensuring accurate tracking.1 parent 3f90184 commit e9d31cd
File tree
5 files changed
+20
-15
lines changed- src/memos
- api/routers
- mem_os
- mem_scheduler/schemas
- multi_mem_cube
5 files changed
+20
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
204 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
| |||
211 | 215 | | |
212 | 216 | | |
213 | 217 | | |
214 | | - | |
| 218 | + | |
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
218 | | - | |
| 222 | + | |
219 | 223 | | |
220 | | - | |
| 224 | + | |
| 225 | + | |
221 | 226 | | |
222 | 227 | | |
223 | 228 | | |
| |||
229 | 234 | | |
230 | 235 | | |
231 | 236 | | |
| 237 | + | |
232 | 238 | | |
233 | 239 | | |
234 | 240 | | |
235 | | - | |
236 | | - | |
| 241 | + | |
| 242 | + | |
237 | 243 | | |
238 | 244 | | |
239 | 245 | | |
| |||
242 | 248 | | |
243 | 249 | | |
244 | 250 | | |
245 | | - | |
246 | | - | |
| 251 | + | |
| 252 | + | |
247 | 253 | | |
248 | 254 | | |
249 | 255 | | |
250 | | - | |
251 | | - | |
| 256 | + | |
| 257 | + | |
252 | 258 | | |
253 | 259 | | |
254 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
| 690 | + | |
690 | 691 | | |
691 | 692 | | |
692 | 693 | | |
| |||
773 | 774 | | |
774 | 775 | | |
775 | 776 | | |
| 777 | + | |
776 | 778 | | |
777 | 779 | | |
778 | 780 | | |
| |||
784 | 786 | | |
785 | 787 | | |
786 | 788 | | |
| 789 | + | |
787 | 790 | | |
788 | 791 | | |
789 | 792 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1499 | 1499 | | |
1500 | 1500 | | |
1501 | 1501 | | |
| 1502 | + | |
1502 | 1503 | | |
1503 | 1504 | | |
1504 | 1505 | | |
1505 | 1506 | | |
1506 | 1507 | | |
1507 | 1508 | | |
1508 | | - | |
1509 | | - | |
| 1509 | + | |
1510 | 1510 | | |
1511 | 1511 | | |
1512 | 1512 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
438 | 437 | | |
439 | | - | |
440 | 438 | | |
441 | 439 | | |
442 | 440 | | |
| |||
458 | 456 | | |
459 | 457 | | |
460 | 458 | | |
461 | | - | |
462 | 459 | | |
463 | 460 | | |
464 | 461 | | |
| |||
0 commit comments