Skip to content

Commit

Permalink
Replace redis.hmset with hset since production is no longer outdated
Browse files Browse the repository at this point in the history
  • Loading branch information
jace committed Jan 3, 2024
1 parent 432d4f4 commit 46a79fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion funnel/views/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def set_video_cache(obj: VideoMixin, data: VideoData, exists: bool = True) -> No
copied_data['uploaded_at'] = cast(
datetime, copied_data['uploaded_at']
).isoformat()
redis_store.hmset(cache_key, copied_data)
redis_store.hset(cache_key, mapping=copied_data)

# if video exists at source, cache for 2 days, if not, for 6 hours
hours_to_cache = 2 * 24 if exists else 6
Expand Down

0 comments on commit 46a79fe

Please sign in to comment.