diff options
| author | Christian Cleberg <[email protected]> | 2026-04-11 18:45:54 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-11 18:45:54 -0500 |
| commit | 01c1b50541b0dc1d42cbdaa90052f6b94ceba20c (patch) | |
| tree | 5af4bd41d6497d4f49254690f97a39f387d7785b /src/srht_contrib/services/aggregator.py | |
| parent | f0393a0b8d541df6b47bbeee6c4270ce8303bf18 (diff) | |
| download | hutch-stats-01c1b50541b0dc1d42cbdaa90052f6b94ceba20c.tar.gz hutch-stats-01c1b50541b0dc1d42cbdaa90052f6b94ceba20c.tar.bz2 hutch-stats-01c1b50541b0dc1d42cbdaa90052f6b94ceba20c.zip | |
feat: prioritize recent-window backfill before full history
Diffstat (limited to 'src/srht_contrib/services/aggregator.py')
| -rw-r--r-- | src/srht_contrib/services/aggregator.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/srht_contrib/services/aggregator.py b/src/srht_contrib/services/aggregator.py index 1c8af86..4973f16 100644 --- a/src/srht_contrib/services/aggregator.py +++ b/src/srht_contrib/services/aggregator.py @@ -62,6 +62,12 @@ class ContributionAggregator: is_indexed=calendar.is_indexed, last_polled_at=calendar.last_polled_at, indexing_state=calendar.indexing_state, + is_recent_window_backfilled=calendar.is_recent_window_backfilled, + recent_backfill_state=calendar.recent_backfill_state, + recent_backfill_completed_at=calendar.recent_backfill_completed_at, + is_backfilled=calendar.is_backfilled, + backfill_state=calendar.backfill_state, + backfill_completed_at=calendar.backfill_completed_at, ) def _index_metadata(self, db: Session, actor: str) -> ContributionIndexMetadata: @@ -81,6 +87,9 @@ class ContributionAggregator: is_indexed=is_indexed, last_polled_at=tracked_actor.last_polled_at if tracked_actor is not None else None, indexing_state=indexing_state, + is_recent_window_backfilled=(tracked_actor.recent_backfill_status == "completed") if tracked_actor is not None else False, + recent_backfill_state=(tracked_actor.recent_backfill_status if tracked_actor is not None else "pending"), + recent_backfill_completed_at=tracked_actor.recent_backfill_completed_at if tracked_actor is not None else None, is_backfilled=(tracked_actor.backfill_status == "completed") if tracked_actor is not None else False, backfill_state=(tracked_actor.backfill_status if tracked_actor is not None else "pending"), backfill_completed_at=tracked_actor.backfill_completed_at if tracked_actor is not None else None, |
