mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Fix refresh time
This commit is contained in:
parent
60360ee2ae
commit
4a7fc4ea69
1 changed files with 1 additions and 1 deletions
|
@ -207,7 +207,7 @@ def get_video(id, client, db, refresh = true)
|
||||||
video = db.query_one("SELECT * FROM videos WHERE id = $1", id, as: Video)
|
video = db.query_one("SELECT * FROM videos WHERE id = $1", id, as: Video)
|
||||||
|
|
||||||
# If record was last updated over an hour ago, refresh (expire param in response lasts for 6 hours)
|
# If record was last updated over an hour ago, refresh (expire param in response lasts for 6 hours)
|
||||||
if refresh && Time.now - video.updated > 1.second
|
if refresh && Time.now - video.updated > 1.hour
|
||||||
begin
|
begin
|
||||||
video = fetch_video(id, client)
|
video = fetch_video(id, client)
|
||||||
video_array = video.to_a
|
video_array = video.to_a
|
||||||
|
|
Loading…
Reference in a new issue