Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
liberty
host
Smilodon
Commits
4eba7671
Commit
4eba7671
authored
Nov 28, 2016
by
Eugen Rochko
Browse files
Adding backtracing to Salmon/Processing workers
parent
27fc49d7
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/models/subscription.rb
View file @
4eba7671
# frozen_string_literal: true
class
Subscription
<
ApplicationRecord
MIN_EXPIRATION
=
3600
*
24
MIN_EXPIRATION
=
3600
*
24
*
7
MAX_EXPIRATION
=
3600
*
24
*
30
belongs_to
:account
...
...
app/services/update_remote_profile_service.rb
View file @
4eba7671
...
...
@@ -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"]'
)
...
...
app/workers/processing_worker.rb
View file @
4eba7671
...
...
@@ -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
))
...
...
app/workers/salmon_worker.rb
View file @
4eba7671
...
...
@@ -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
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment