Welcome to mirror list, hosted at ThFree Co, Russian Federation.

fetch_webfinger.rb « workers « app - github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dbf4f95e6b64c7a8c68fc1dd878c9d83170ffe8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

#   Copyright (c) 2010-2012, Diaspora Inc.  This file is
#   licensed under the Affero General Public License version 3 or later.  See
#   the COPYRIGHT file.

module Workers
  class FetchWebfinger < Base
    sidekiq_options queue: :urgent

    def perform(account)
      person = Person.find_or_fetch_by_identifier(account)

      # also, schedule to fetch a few public posts from that person
      Diaspora::Fetcher::Public.queue_for(person)
    rescue DiasporaFederation::Discovery::DiscoveryError
      # Ignored
    end
  end
end