fix error
This commit is contained in:
parent
619ce80267
commit
a73850d85d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue