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
7944ed6f
Commit
7944ed6f
authored
8 years ago
by
Eugen Rochko
Browse files
Options
Downloads
Patches
Plain Diff
Adding option to specify asset server, filter followers query by local accounts
during Fan Out On Write to load less stuff into memory
parent
627a85f4
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/fan_out_on_write_service.rb
+2
-2
2 additions, 2 deletions
app/services/fan_out_on_write_service.rb
config/environments/production.rb
+1
-0
1 addition, 0 deletions
config/environments/production.rb
with
3 additions
and
2 deletions
app/services/fan_out_on_write_service.rb
+
2
−
2
View file @
7944ed6f
...
@@ -24,8 +24,8 @@ class FanOutOnWriteService < BaseService
...
@@ -24,8 +24,8 @@ class FanOutOnWriteService < BaseService
def
deliver_to_followers
(
status
)
def
deliver_to_followers
(
status
)
Rails
.
logger
.
debug
"Delivering status
#{
status
.
id
}
to followers"
Rails
.
logger
.
debug
"Delivering status
#{
status
.
id
}
to followers"
status
.
account
.
followers
.
find_each
do
|
follower
|
status
.
account
.
followers
.
where
(
domain:
nil
).
find_each
do
|
follower
|
next
if
!
follower
.
local?
||
FeedManager
.
instance
.
filter?
(
:home
,
status
,
follower
)
next
if
FeedManager
.
instance
.
filter?
(
:home
,
status
,
follower
)
FeedManager
.
instance
.
push
(
:home
,
follower
,
status
)
FeedManager
.
instance
.
push
(
:home
,
follower
,
status
)
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
config/environments/production.rb
+
1
−
0
View file @
7944ed6f
...
@@ -13,6 +13,7 @@ Rails.application.configure do
...
@@ -13,6 +13,7 @@ Rails.application.configure do
# Full error reports are disabled and caching is turned on.
# Full error reports are disabled and caching is turned on.
config
.
consider_all_requests_local
=
false
config
.
consider_all_requests_local
=
false
config
.
action_controller
.
perform_caching
=
true
config
.
action_controller
.
perform_caching
=
true
config
.
action_controller
.
asset_host
=
ENV
[
'CDN_HOST'
]
# Disable serving static files from the `/public` folder by default since
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
# Apache or NGINX already handles this.
...
...
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