mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Fix rows for subscribe job
This commit is contained in:
parent
e4dc430c74
commit
99d9c3a900
1 changed files with 6 additions and 4 deletions
|
@ -158,6 +158,7 @@ def subscribe_to_feeds(db, logger, key, config)
|
||||||
spawn do
|
spawn do
|
||||||
loop do
|
loop do
|
||||||
db.query_all("SELECT id FROM channels WHERE CURRENT_TIMESTAMP - subscribed > '4 days'") do |rs|
|
db.query_all("SELECT id FROM channels WHERE CURRENT_TIMESTAMP - subscribed > '4 days'") do |rs|
|
||||||
|
rs.each do
|
||||||
ucid = rs.read(String)
|
ucid = rs.read(String)
|
||||||
response = subscribe_pubsub(ucid, key, config)
|
response = subscribe_pubsub(ucid, key, config)
|
||||||
|
|
||||||
|
@ -165,6 +166,7 @@ def subscribe_to_feeds(db, logger, key, config)
|
||||||
logger.write("#{ucid} : #{response.body}\n")
|
logger.write("#{ucid} : #{response.body}\n")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
sleep 1.minute
|
sleep 1.minute
|
||||||
Fiber.yield
|
Fiber.yield
|
||||||
|
|
Loading…
Reference in a new issue