Module: DiasporaFederation::Federation::Fetcher
- Defined in:
- lib/diaspora_federation/federation/fetcher.rb
Overview
This module is for fetching entities from other pods.
Defined Under Namespace
Classes: NotFetchable
Class Method Summary collapse
-
.fetch_public(author, entity_type, guid) ⇒ Object
Fetches a public entity from a remote pod.
Class Method Details
.fetch_public(author, entity_type, guid) ⇒ Object
Fetches a public entity from a remote pod
12 13 14 15 16 17 18 19 |
# File 'lib/diaspora_federation/federation/fetcher.rb', line 12 def self.fetch_public(, entity_type, guid) type = entity_name(entity_type).to_s raise "Already fetching ..." if fetching[type].include?(guid) fetch_from_url(, type, guid) rescue => e # rubocop:disable Style/RescueStandardError raise NotFetchable, "Failed to fetch #{entity_type}:#{guid} from #{}: #{e.class}: #{e.}" end |