Class: Workers::GatherOpenGraphData
- Inherits:
-
Base
- Object
- Base
- Workers::GatherOpenGraphData
show all
- Defined in:
- app/workers/gather_open_graph_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_open_graph_data.rb', line 10
def perform(post_id, url, retry_count=1)
post = Post.find(post_id)
post.open_graph_cache = OpenGraphCache.find_or_create_by_url(url)
post.save
rescue ActiveRecord::RecordNotFound
GatherOpenGraphData.perform_in(1.minute, post_id, url, retry_count+1) unless retry_count > 3
end
|