Fix Sidekiq pooling issues. Remove API docs from homepage, replace with
a basic home timeline
This commit is contained in:
parent
bb98ee489d
commit
5764d52b04
6 changed files with 102 additions and 201 deletions
|
@ -124,7 +124,13 @@
|
||||||
background: #d9e1e8;
|
background: #d9e1e8;
|
||||||
border-radius: 0 4px 4px 0;
|
border-radius: 0 4px 4px 0;
|
||||||
|
|
||||||
.dashboard__content__content {
|
.dashboard__top-bar {
|
||||||
|
border-radius: 0 4px 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard__content__content {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
color: #282c37;
|
color: #282c37;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
|
@ -209,12 +215,6 @@
|
||||||
height: 0;
|
height: 0;
|
||||||
margin: 30px 0;
|
margin: 30px 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard__top-bar {
|
|
||||||
border-radius: 0 4px 0 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.simple_form {
|
.simple_form {
|
||||||
|
|
|
@ -4,5 +4,6 @@ class HomeController < ApplicationController
|
||||||
before_action :authenticate_user!
|
before_action :authenticate_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@timeline = Feed.new(:home, current_user.account).get(10, params[:max_id])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,111 +4,7 @@
|
||||||
.form-actions
|
.form-actions
|
||||||
= f.button :submit, 'Post update'
|
= f.button :submit, 'Post update'
|
||||||
|
|
||||||
%hr/
|
- content_for :raw_content do
|
||||||
|
.activity-stream.activity-stream-embedded
|
||||||
%h3 OAuth2
|
- @timeline.each do |status|
|
||||||
%p All API methods require a valid access token.
|
= render partial: 'stream_entries/status', locals: { status: status }
|
||||||
|
|
||||||
%h3 Statuses
|
|
||||||
%ul.api-descriptions
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method GET
|
|
||||||
%samp /api/statuses/home
|
|
||||||
.description
|
|
||||||
Returns user's home timeline
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method GET
|
|
||||||
%samp /api/statuses/mentions
|
|
||||||
.description
|
|
||||||
Returns user's mentions timeline
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method POST
|
|
||||||
%samp /api/statuses
|
|
||||||
.options
|
|
||||||
Options:
|
|
||||||
= succeed ',' do
|
|
||||||
%samp status
|
|
||||||
%samp in_reply_to_id
|
|
||||||
.description
|
|
||||||
Creates a new status, optionally as a response to another, from user's account. Returns the new status.
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method GET
|
|
||||||
%samp /api/statuses/:id
|
|
||||||
.description
|
|
||||||
Returns a single status
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method POST
|
|
||||||
%samp /api/statuses/:id/reblog
|
|
||||||
.description
|
|
||||||
Reblogs a status from user's account. Returns the target status.
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method POST
|
|
||||||
%samp /api/statuses/:id/favourite
|
|
||||||
.description
|
|
||||||
Favourites a status from user's account. Returns the target status.
|
|
||||||
|
|
||||||
%h3 Accounts
|
|
||||||
%ul.api-descriptions
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method GET
|
|
||||||
%samp /api/accounts/:id
|
|
||||||
.description
|
|
||||||
Returns a single account
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method GET
|
|
||||||
%samp /api/accounts/:id/statuses
|
|
||||||
.description
|
|
||||||
Returns an account's statuses
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method GET
|
|
||||||
%samp /api/accounts/:id/followers
|
|
||||||
.description
|
|
||||||
Returns accounts following an account
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method GET
|
|
||||||
%samp /api/accounts/:id/following
|
|
||||||
.description
|
|
||||||
Returns the accounts the target account follows
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method POST
|
|
||||||
%samp /api/accounts/:id/follow
|
|
||||||
.description
|
|
||||||
Follows target account from the user's account. Returns the target account.
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method POST
|
|
||||||
%samp /api/accounts/:id/unfollow
|
|
||||||
.description
|
|
||||||
Unfollows target account from the user's account. Returns the target account.
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method GET
|
|
||||||
%samp /api/accounts/lookup
|
|
||||||
.options
|
|
||||||
Options:
|
|
||||||
%samp usernames
|
|
||||||
.description
|
|
||||||
Returns accounts for a comma-separated list of usernames
|
|
||||||
|
|
||||||
%h3 Follows
|
|
||||||
%ul.api-descriptions
|
|
||||||
%li
|
|
||||||
.address
|
|
||||||
%samp.method POST
|
|
||||||
%samp /api/follows
|
|
||||||
.options
|
|
||||||
Options:
|
|
||||||
%samp uri
|
|
||||||
.description
|
|
||||||
Follows a user, regardless of where they are, from user's account. URI assumed to be of username@domain form. Returns the target account.
|
|
||||||
|
|
|
@ -21,13 +21,18 @@
|
||||||
= link_to settings_path do
|
= link_to settings_path do
|
||||||
= fa_icon 'user'
|
= fa_icon 'user'
|
||||||
Edit profile
|
Edit profile
|
||||||
|
|
||||||
.dashboard__content
|
.dashboard__content
|
||||||
.dashboard__top-bar
|
.dashboard__top-bar
|
||||||
= content_for?(:page_title) ? yield(:page_title) : 'Mastodon'
|
= content_for?(:page_title) ? yield(:page_title) : 'Mastodon'
|
||||||
%ul
|
%ul
|
||||||
%li= link_to fa_icon('gear'), edit_registration_path(current_user), title: 'Change password'
|
%li= link_to fa_icon('gear'), edit_registration_path(current_user), title: 'Change password'
|
||||||
%li= link_to fa_icon('sign-out'), destroy_user_session_path, method: :delete, title: 'Sign out'
|
%li= link_to fa_icon('sign-out'), destroy_user_session_path, method: :delete, title: 'Sign out'
|
||||||
|
|
||||||
.dashboard__content__content= yield
|
.dashboard__content__content= yield
|
||||||
|
|
||||||
|
= yield(:raw_content)
|
||||||
|
|
||||||
.footer
|
.footer
|
||||||
.domain= Rails.configuration.x.local_domain
|
.domain= Rails.configuration.x.local_domain
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
default: &default
|
default: &default
|
||||||
adapter: postgresql
|
adapter: postgresql
|
||||||
pool: 10
|
pool: 15
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
encoding: unicode
|
encoding: unicode
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
redis_conn = proc {
|
host = ENV['REDIS_HOST'] || 'localhost'
|
||||||
$redis.dup
|
port = ENV['REDIS_PORT'] || 6379
|
||||||
}
|
|
||||||
|
|
||||||
Sidekiq.configure_server do |config|
|
Sidekiq.configure_server do |config|
|
||||||
config.redis = ConnectionPool.new(size: 5, &redis_conn)
|
config.redis = { host: host, port: port }
|
||||||
end
|
end
|
||||||
|
|
||||||
Sidekiq.configure_client do |config|
|
Sidekiq.configure_client do |config|
|
||||||
config.redis = ConnectionPool.new(size: 5, &redis_conn)
|
config.redis = { host: host, port: port }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue