Skip to content

Commit

Permalink
Update firestore filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
danghai committed Nov 30, 2023
1 parent 92b925f commit f777707
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kcidb/monitor/spool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ def wipe(self, until=None):
isinstance(until, datetime.datetime) and until.tzinfo
if until is None:
until = datetime.datetime.now(datetime.timezone.utc)
filter_condition = [("created_at", "<=", until)]
for snapshot in \
self._get_coll().where("created_at", "<=", until). \
self._get_coll().where(filter=filter_condition). \
select([]).stream():
snapshot.reference.delete()

Expand Down

0 comments on commit f777707

Please sign in to comment.