Skip to content

Commit

Permalink
fix elastic error when fetching expired events (#2180)
Browse files Browse the repository at this point in the history
fix `Result window is too large, from + size must be less than or equal to: [10000]`
  • Loading branch information
petrjasek authored Jan 14, 2025
1 parent ee37c70 commit fa5da65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/planning/events/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ def get_expired_items(self, expiry_datetime, spiked_events_only=False):
total_received = 0
total_events = -1

while True:
while total_received + get_max_recurrent_events() < 10000: # 10k is max elastic limit
query["from"] = total_received

results = self.search(query)
Expand Down

0 comments on commit fa5da65

Please sign in to comment.