Przeglądaj źródła

Adding backtracing to Salmon/Processing workers

master
Eugen Rochko 7 lat temu
rodzic
commit
4eba76711b
4 zmienionych plików z 5 dodań i 1 usunięć
  1. +1
    -1
      app/models/subscription.rb
  2. +2
    -0
      app/services/update_remote_profile_service.rb
  3. +1
    -0
      app/workers/processing_worker.rb
  4. +1
    -0
      app/workers/salmon_worker.rb

+ 1
- 1
app/models/subscription.rb Wyświetl plik

@@ -1,7 +1,7 @@
# frozen_string_literal: true

class Subscription < ApplicationRecord
MIN_EXPIRATION = 3600 * 24
MIN_EXPIRATION = 3600 * 24 * 7
MAX_EXPIRATION = 3600 * 24 * 30

belongs_to :account


+ 2
- 0
app/services/update_remote_profile_service.rb Wyświetl plik

@@ -5,6 +5,8 @@ class UpdateRemoteProfileService < BaseService
DFRN_NS = 'http://purl.org/macgirvin/dfrn/1.0'

def call(xml, account, resubscribe = false)
return if xml.nil?

author_xml = xml.at_xpath('./xmlns:author') || xml.at_xpath('./dfrn:owner', dfrn: DFRN_NS)
hub_link = xml.at_xpath('./xmlns:link[@rel="hub"]')



+ 1
- 0
app/workers/processing_worker.rb Wyświetl plik

@@ -2,6 +2,7 @@

class ProcessingWorker
include Sidekiq::Worker
sidekiq_options backtrace: true

def perform(account_id, body)
ProcessFeedService.new.call(body, Account.find(account_id))


+ 1
- 0
app/workers/salmon_worker.rb Wyświetl plik

@@ -2,6 +2,7 @@

class SalmonWorker
include Sidekiq::Worker
sidekiq_options backtrace: true

def perform(account_id, body)
ProcessInteractionService.new.call(body, Account.find(account_id))


Ładowanie…
Anuluj
Zapisz