fix error
This commit is contained in:
parent
35a850b038
commit
2ae8f9abc6
|
@ -188,7 +188,14 @@ class BulletinFeed
|
||||||
}.to_json
|
}.to_json
|
||||||
BulletinFeedCache.where(uid: uid,start: startdt,end: enddt,date: dt).destroy
|
BulletinFeedCache.where(uid: uid,start: startdt,end: enddt,date: dt).destroy
|
||||||
feed_cache = BulletinFeedCache.create(uid: uid,content: anns,start: startdt,end: enddt,date: dt,invalid_date: invalid_date)
|
feed_cache = BulletinFeedCache.create(uid: uid,content: anns,start: startdt,end: enddt,date: dt,invalid_date: invalid_date)
|
||||||
feed_cache.content
|
(1..5).each do
|
||||||
|
if JSON.load(feed_cache.content)['announcements'].length == all_anns.length
|
||||||
|
break
|
||||||
|
else
|
||||||
|
sleep(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
all_anns
|
||||||
end
|
end
|
||||||
def self.smart_convertor(text,url)
|
def self.smart_convertor(text,url)
|
||||||
doc = Nokogiri.HTML(text)
|
doc = Nokogiri.HTML(text)
|
||||||
|
|
Loading…
Reference in New Issue