Skip to content

Commit

Permalink
fix: query needs a max time range (#20626)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra authored Feb 29, 2024
1 parent c033a7c commit 8d0efa1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ee/session_recordings/ai/generate_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ def generate_recording_embeddings(session_id: str, team: Team | int) -> List[flo

client = OpenAI()

session_metadata = SessionReplayEvents().get_metadata(session_id=str(session_id), team=team)
eight_days_ago = datetime.datetime.now(pytz.UTC) - datetime.timedelta(days=8)
session_metadata = SessionReplayEvents().get_metadata(
session_id=str(session_id), team=team, recording_start_time=eight_days_ago
)
if not session_metadata:
logger.error(f"no session metadata found for session", flow="embeddings", session_id=session_id)
SESSION_SKIPPED_WHEN_GENERATING_EMBEDDINGS.inc()
Expand Down

0 comments on commit 8d0efa1

Please sign in to comment.