Skip to content

[mock_uss] Regular cleanup of outdated flights#1364

Merged
BenjaminPelletier merged 1 commit intointeruss:mainfrom
Orbitalize:garbage_collection_on_mocks_3
Feb 26, 2026
Merged

[mock_uss] Regular cleanup of outdated flights#1364
BenjaminPelletier merged 1 commit intointeruss:mainfrom
Orbitalize:garbage_collection_on_mocks_3

Conversation

@the-glu
Copy link
Contributor

@the-glu the-glu commented Feb 24, 2026

This PR add a regular cleaning job of flights and operational intents in mock_uss/flights/database.

Idea is to prevent building-up of flights if mock uss stay up for a long time. Memory is still limited (in SynchronizedValue), but it should help for #1059.

Interval values has been set arbitrary, they should work most of the time and don't interfere with regular tests.

I switched to a period task instead of having manual calls everywhere (including notifications).

Similar changes should be done for ridsp database as we do have flights that can build-up there. For others instances of databases, we could have build-up of elements but we don't have time information (e.g. riddp has only flight urls).

@the-glu the-glu force-pushed the garbage_collection_on_mocks_3 branch from 2528aca to b4bf02c Compare February 24, 2026 10:13

for op_id, op_intent in self.cached_operations.items():
if (
op_intent.reference.time_end.value.datetime + FLIGHTS_LIMIT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Probably OPERATIONAL_INTENTS_LIMIT? I can adjust in my follow-up PR.

@BenjaminPelletier BenjaminPelletier merged commit bb3d4c4 into interuss:main Feb 26, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants