Class: Job::SocketWebfinger
- Inherits:
-
Base
- Object
- Base
- Job::SocketWebfinger
- Defined in:
- app/models/jobs/socket_webfinger.rb
Class Method Summary (collapse)
Methods inherited from Base
Methods included from ResqueJobLogging
#application_trace, #around_perform_log_job
Class Method Details
+ (Object) perform_delegate(user_id, account, opts = {})
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/models/jobs/socket_webfinger.rb', line 11 def self.perform_delegate(user_id, account, opts={}) finger = Webfinger.new(account) begin result = finger.fetch result.socket_to_user(user_id, opts) rescue Diaspora::WebSocket.queue_to_user(user_id, {:class => 'people', :status => 'fail', :query => account, :response => I18n.t('people.webfinger.fail', :handle => account)}.to_json) end end |