Closed vicb closed 4 months ago
This pull request introduces support for fetching and displaying 48-hour live data history. The changes include refactoring the fetcher logic to handle different time ranges, updating API endpoints, and modifying frontend components to support the new data retention periods. Additionally, enums for data retention and interval constants were introduced for better maintainability.
Files | Changes |
---|---|
apps/fetcher/src/fetcher.ts apps/fetcher/src/app/trackers/refresh.ts apps/fetcher/src/app/ufos/refresh.ts |
Refactored fetcher logic to support 12h, 24h, and 48h data retention, including new helper functions and updated pipeline commands. |
libs/common/src/lib/live-track.ts libs/common/src/lib/redis-keys.ts |
Introduced enums for data retention and interval constants, and updated Redis keys to reflect new data retention periods. |
apps/fxc-server/src/app/routes/live-track.ts apps/fxc-front/src/app/redux/live-track-slice.ts apps/fxc-front/src/app/components/ui/main-menu.ts |
Updated API and frontend logic to support fetching and displaying 48-hour live data history. |
apps/fetcher/src/app/trackers/inreach.ts apps/fetcher/src/app/trackers/skylines.ts apps/fetcher/src/app/trackers/flymaster.ts apps/fetcher/src/app/trackers/spot.ts |
Replaced old interval constants with new LiveDataIntervalSec enum for consistency. |
apps/fxc-front/src/app/pages/admin.ts apps/fxc-server/src/app/routes/admin.ts |
Updated admin pages to use new keys for full and incremental track counts. |
The updates introduce changes across multiple files, primarily involving renaming constants and restructuring code for better clarity and organization. Key constants related to time intervals and retention periods in live tracking have been refactored into enums, and function parameters have been updated accordingly. These modifications also improve error handling, logging mechanisms, and streamline the overall logic in the fetching and processing of live tracker data.
Files | Change Summary |
---|---|
.../flymaster.ts , .../inreach.ts , .../skylines.ts , .../spot.ts , .../tracker.ts , .../xcontest.ts , .../refresh.ts , .../live-track.ts |
Replaced the constant LIVE_MINIMAL_INTERVAL_SEC with LiveDataIntervalSec.Recent in simplifyLiveTrack function calls. |
.../refresh.ts , .../ufos/refresh.ts |
Renamed variables related to live data intervals and retention periods, updated assignments, and adjusted function calls. |
.../fetcher.ts |
Removed references to old constants, introduced LiveDataRetentionSec , reorganized track processing logic, and added a new function maybePushTrack . |
.../main-menu.ts , .../supporter-modal.ts |
Added a new <ion-select> option for 48 hours, and updated the hosting cost text. |
.../admin.ts , .../privacy-policy.ts |
Updated keys and renamed constants related to track display durations. |
.../live-track-slice.ts |
Updated updateTrackers function to include fetchMin calculation and use it in the fetch URL. |
.../redis-keys.ts |
Reorganized live track keys in Redis and updated naming conventions for clarity. |
.../live-track.ts |
Reorganized constants to enums for better clarity in defining data retention and intervals. |
In the code where data flows, Constants shift, and clarity grows, For live tracks new enums rise, Simplified in coderβs eyes.
Forty-eight hours now we see, Improved the flow, refined with glee. πβ¨π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Latest commit: |
3cecaba
|
Status: | β Deploy successful! |
Preview URL: | https://4a138e5c.flyxc.pages.dev |
Branch Preview URL: | https://h48.flyxc.pages.dev |
Summary by Sourcery
This pull request adds support for retrieving 48 hours of live data history, refactors live data retention and interval constants into enums, and updates the logic for handling live track data to support multiple retention periods. Additionally, the privacy policy has been updated to reflect the new data retention period.
maybePushTrack
function.Summary by CodeRabbit
New Features
Bug Fixes
Refactor
LiveDataIntervalSec
andLiveDataRetentionSec
enums.getTrackerRouter
function to handle token-based requests more efficiently.Documentation