Skip to content

Conversation

@ThiagoAVicente
Copy link
Contributor

Summary

Refactor processor logic to support multiple dedicated processor instances.

Changes

  • Removed in-memory buffer.
  • Processor now queries the database directly for raw data.
  • Added the ability to start a processor from a past timestamp, allowing it to immediately query historical data instead of waiting for new data.

This enables processors to handle cells that have not received data since the processor started, ensuring no data gaps for historical windows.

closes #19

ThiagoAVicente and others added 3 commits December 11, 2025 21:15
- Replace synchronous requests with async httpx for better performance
- Process all cells in parallel using asyncio.gather() instead of sequentially
- Add 18 integration tests for TimeWindowManager covering:
  - Basic functionality and batched data fetching
  - Empty window strategies (skip, zerofill, forwardfill)
  - Error handling (timeouts, connection errors, malformed responses)
  - Watermark management and historical processing
- All tests use mocked storage API to avoid external dependencies

Performance improvement: For N cells, HTTP requests now run in parallel
instead of sequentially, reducing watermark advancement time from O(N) to O(1).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@ThiagoAVicente ThiagoAVicente removed the request for review from JPSP9547 December 11, 2025 22:11
Copy link
Contributor

@alxmra alxmra left a comment

Choose a reason for hiding this comment

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

seems reasonable

@alxmra alxmra merged commit 69ca7ce into main Dec 12, 2025
4 checks passed
@ThiagoAVicente ThiagoAVicente deleted the enchancement/processor_to_query_db branch December 12, 2025 11:08
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.

Refactor processor

3 participants