Skip to content

Conversation

@haoruizhou
Copy link
Collaborator

  • data-downloader/backend/services.py:71 now feeds the sensor collector with fallback start/end timestamps derived from the freshly scanned run windows, eliminating the static date dependency and ensuring both scanners stay in sync; the helper at data-downloader/backend/services.py:124 safely scans the windows, normalizes them to UTC, and only returns a range when it is valid so the SQL chunking logic in backend/ sql.py stays unchanged and memory-friendly.
  • data-downloader/backend/config.py:31 drops the unused SENSOR_FALLBACK_* settings so the app no longer advertises manual fallback tuning knobs that would fight the new automatic behavior.
  • data-downloader/README.md:35 explains the new automatic fallback derived from the date scanner, and data- downloader/.env.example:11 removes the obsolete environment variables from the sample configuration to keep deploys aligned with the new flow.

  - data-downloader/backend/services.py:71 now feeds the sensor collector with fallback start/end timestamps
    derived from the freshly scanned run windows, eliminating the static date dependency and ensuring both
    scanners stay in sync; the helper at data-downloader/backend/services.py:124 safely scans the windows,
    normalizes them to UTC, and only returns a range when it is valid so the SQL chunking logic in backend/
    sql.py stays unchanged and memory-friendly.
  - data-downloader/backend/config.py:31 drops the unused SENSOR_FALLBACK_* settings so the app no longer
    advertises manual fallback tuning knobs that would fight the new automatic behavior.
  - data-downloader/README.md:35 explains the new automatic fallback derived from the date scanner, and data-
    downloader/.env.example:11 removes the obsolete environment variables from the sample configuration to
    keep deploys aligned with the new flow.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR replaces the static sensor fallback date configuration with an automatic fallback mechanism that derives start/end timestamps from the scanned run windows. This ensures the run scanner and sensor collector remain synchronized without manual date configuration.

  • Implements _build_sensor_fallback_range helper to compute fallback dates from scanned runs
  • Removes SENSOR_FALLBACK_START and SENSOR_FALLBACK_END configuration settings
  • Updates documentation to reflect the new automatic behavior

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
installer/data-downloader/backend/services.py Adds helper method to build sensor fallback range from scanned runs and integrates it into the scan workflow
installer/data-downloader/backend/config.py Removes obsolete sensor fallback configuration fields
installer/data-downloader/README.md Updates documentation to explain the new automatic fallback behavior
installer/data-downloader/.env.example Removes deprecated environment variable examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@haoruizhou haoruizhou merged commit 648882f into main Nov 14, 2025
3 of 5 checks passed
@haoruizhou haoruizhou deleted the improve-sensor-scanner branch November 14, 2025 05:02
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