Skip to content

Commit

Permalink
add last_updated_at value when updating meta streams
Browse files Browse the repository at this point in the history
  • Loading branch information
mhdzumair committed Jan 22, 2025
1 parent 6b5b9ca commit 5dfc1f3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions db/crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import json
import logging
import re
from datetime import datetime
from datetime import datetime, timezone
from typing import Optional, Type, Literal
from uuid import uuid4

Expand Down Expand Up @@ -1715,7 +1715,12 @@ async def update_meta_stream(meta_id: str, is_update_data_only: bool = False) ->
]
).to_list(1)

update_data = {"total_streams": 0, "last_stream_added": None, "catalogs": []}
update_data = {
"total_streams": 0,
"last_stream_added": None,
"catalogs": [],
"last_updated_at": datetime.now(tz=timezone.utc),
}

if streams_stats:
# Flatten the catalogs list and remove duplicates
Expand Down

0 comments on commit 5dfc1f3

Please sign in to comment.