Commit 7e58856
refactor(BA-4910): Use set comprehension for container_ids deduplication
Change container_ids collection from list to set comprehension in
collect_container_stat() and collect_process_stat() to automatically
deduplicate container IDs and prevent redundant stat collection.
Benefits:
- Automatic deduplication of container IDs
- More efficient (no duplicate processing)
- Semantically clearer (expresses intent of unique IDs)
- Defensive against edge cases in kernel registry
Changes:
- src/ai/backend/agent/agent.py:1391: collect_container_stat()
- src/ai/backend/agent/agent.py:1403: collect_process_stat()
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 87e336a commit 7e58856
1 file changed
+12
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1388 | 1388 | | |
1389 | 1389 | | |
1390 | 1390 | | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
1395 | | - | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
1396 | 1396 | | |
1397 | | - | |
| 1397 | + | |
1398 | 1398 | | |
1399 | 1399 | | |
1400 | 1400 | | |
1401 | 1401 | | |
1402 | 1402 | | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
1408 | 1408 | | |
1409 | | - | |
| 1409 | + | |
1410 | 1410 | | |
1411 | 1411 | | |
1412 | 1412 | | |
| |||
0 commit comments