Class: Workers::GatherOEmbedData
- Inherits:
-
Base
- Object
- Base
- Workers::GatherOEmbedData
show all
- Defined in:
- app/workers/gather_o_embed_data.rb
Instance Method Summary
collapse
Methods inherited from Base
#suppress_annoying_errors
Instance Method Details
10
11
12
13
14
15
16
17
18
19
20
|
# File 'app/workers/gather_o_embed_data.rb', line 10
def perform(post_id, url, retry_count=1)
post = Post.find(post_id)
post.o_embed_cache = OEmbedCache.find_or_create_by_url(url)
post.save
rescue ActiveRecord::RecordNotFound
GatherOEmbedData.perform_in(1.minute, post_id, url, retry_count+1) unless retry_count > 3
end
|