mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Decrease time between channel updates
This commit is contained in:
parent
0c5b92a6cb
commit
029077a4e8
1 changed files with 1 additions and 1 deletions
|
@ -513,7 +513,7 @@ def get_channel(id, client, db)
|
||||||
if db.query_one?("SELECT EXISTS (SELECT true FROM channels WHERE id = $1)", id, as: Bool)
|
if db.query_one?("SELECT EXISTS (SELECT true FROM channels WHERE id = $1)", id, as: Bool)
|
||||||
channel = db.query_one("SELECT * FROM channels WHERE id = $1", id, as: InvidiousChannel)
|
channel = db.query_one("SELECT * FROM channels WHERE id = $1", id, as: InvidiousChannel)
|
||||||
|
|
||||||
if Time.now - channel.updated > 10.minutes
|
if Time.now - channel.updated > 1.minute
|
||||||
channel = fetch_channel(id, client, db)
|
channel = fetch_channel(id, client, db)
|
||||||
channel_array = channel.to_a
|
channel_array = channel.to_a
|
||||||
args = arg_array(channel_array)
|
args = arg_array(channel_array)
|
||||||
|
|
Loading…
Reference in a new issue