Skip to content

Commit

Permalink
Sets asc order on event request and start_date is now - 30 days
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Kasaboski committed Feb 15, 2025
1 parent 9be6825 commit cf447c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/flare/bin/cron_job_ingest_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from datetime import date
from datetime import datetime
from datetime import timedelta
from typing import Any
from typing import Iterator
from typing import Optional
Expand Down Expand Up @@ -255,7 +256,7 @@ def save_last_ingested_tenant_id(kvstore: KVStoreCollections, tenant_id: int) ->
save_collection_value(
kvstore=kvstore,
key=CollectionKeys.START_DATE.value,
value=date.today().isoformat(),
value=(date.today() - timedelta(days=30)).isoformat(),
)

save_collection_value(
Expand Down
1 change: 1 addition & 0 deletions packages/flare/bin/flare.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def _fetch_event_feed_metadata(
) -> Iterator[requests.Response]:
data: Dict[str, Any] = {
"from": next if next else None,
"order": "asc",
"filters": {
"materialized_at": {
"gte": start_date.isoformat()
Expand Down

0 comments on commit cf447c2

Please sign in to comment.