Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
89c77fe2
Commit
89c77fe2
authored
7 years ago
by
ThibG
Committed by
Eugen Rochko
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Instantiate service classes for each call (fixes #5540) (#5543)
parent
e843f62f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/services/post_status_service.rb
+2
-2
2 additions, 2 deletions
app/services/post_status_service.rb
app/services/process_mentions_service.rb
+3
-3
3 additions, 3 deletions
app/services/process_mentions_service.rb
with
5 additions
and
5 deletions
app/services/post_status_service.rb
+
2
−
2
View file @
89c77fe2
...
...
@@ -70,11 +70,11 @@ class PostStatusService < BaseService
end
def
process_mentions_service
@process_mentions_service
||=
ProcessMentionsService
.
new
ProcessMentionsService
.
new
end
def
process_hashtags_service
@process_hashtags_service
||=
ProcessHashtagsService
.
new
ProcessHashtagsService
.
new
end
def
redis
...
...
This diff is collapsed.
Click to expand it.
app/services/process_mentions_service.rb
+
3
−
3
View file @
89c77fe2
...
...
@@ -16,7 +16,7 @@ class ProcessMentionsService < BaseService
if
mentioned_account
.
nil?
&&
!
domain
.
nil?
begin
mentioned_account
=
follow
_remote_account_service
.
call
(
match
.
first
.
to_s
)
mentioned_account
=
resolve
_remote_account_service
.
call
(
match
.
first
.
to_s
)
rescue
Goldfinger
::
Error
,
HTTP
::
Error
mentioned_account
=
nil
end
...
...
@@ -54,7 +54,7 @@ class ProcessMentionsService < BaseService
).
as_json
).
sign!
(
status
.
account
))
end
def
follow
_remote_account_service
@follow_remote_account_service
||=
ResolveRemoteAccountService
.
new
def
resolve
_remote_account_service
ResolveRemoteAccountService
.
new
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment