@ -158,6 +158,7 @@ def subscribe_to_feeds(db, logger, key, config)
spawn do
loop do
db.query_all("SELECT id FROM channels WHERE CURRENT_TIMESTAMP - subscribed > '4 days'") do |rs|
rs.each do
ucid = rs.read(String)
response = subscribe_pubsub(ucid, key, config)
@ -165,6 +166,7 @@ def subscribe_to_feeds(db, logger, key, config)
logger.write("#{ucid} : #{response.body}\n")
end
sleep 1.minute
Fiber.yield