fix error
This commit is contained in:
parent
6807b93489
commit
4da5940753
|
@ -29,8 +29,11 @@ class BulletinFeed
|
|||
end
|
||||
end
|
||||
def generate_one_cache_timeout(startdt: nil,enddt: nil,dt: nil, base_url: nil, timeout: nil)
|
||||
timeout = 100000 if timeout.nil?
|
||||
begin
|
||||
if timeout.nil?
|
||||
feed_cache = self.generate_one_cache(startdt: startdt,enddt: enddt,dt: dt,base_url: base_url)
|
||||
feed_cache.content
|
||||
else
|
||||
Timeout::timeout(timeout) {
|
||||
feed_cache = nil
|
||||
Thread.new do
|
||||
|
@ -42,6 +45,7 @@ class BulletinFeed
|
|||
end
|
||||
feed_cache.content
|
||||
}
|
||||
end
|
||||
rescue=> e
|
||||
puts [e,e.backtrace]
|
||||
""
|
||||
|
|
Loading…
Reference in New Issue