fix error

This commit is contained in:
邱博亞 committed 2022-02-23 13:43:17 +08:00
1 parent 619ce80267
commit a73850d85d
1 file changed
+2 -3
+2 -3
View File
@@ -36,14 +36,13 @@ class BulletinFeed
else
Timeout::timeout(timeout) do
feed_cache = nil
Thread.new do
thread = Thread.new do
feed_cache = self.generate_one_cache(startdt: startdt,enddt: enddt,dt: dt,base_url: base_url)
end
(1..(timeout.to_i+1)).each do
sleep(1)
break if !feed_cache.nil?
break if !feed_cache.nil? && !thread.alive?
end
sleep(0.5)
feed_cache.content
end
end