mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
rake mastodon:setup: Restore Redis config prior to creating an admin user
This commit is contained in:
parent
05d4c50f64
commit
5ee2d98b40
1 changed files with 9 additions and 0 deletions
|
@ -470,6 +470,15 @@ namespace :mastodon do
|
||||||
require_relative '../../config/environment'
|
require_relative '../../config/environment'
|
||||||
disable_log_stdout!
|
disable_log_stdout!
|
||||||
|
|
||||||
|
# With the environment now reloaded, update Sidekiq to use the Redis config that was provided earlier interactively, in case it differs from the default localhost:6379.
|
||||||
|
# When the admin user is created, User dispatches an 'account.created' event to Sidekiq, which connects to Redis.
|
||||||
|
Sidekiq.configure_client do |config|
|
||||||
|
new_params = REDIS_SIDEKIQ_PARAMS.dup
|
||||||
|
new_params['url'] = "redis://:#{env['REDIS_PASSWORD']}@#{env['REDIS_HOST']}:#{env['REDIS_PORT']}/0"
|
||||||
|
new_params.freeze
|
||||||
|
config.redis = new_params
|
||||||
|
end
|
||||||
|
|
||||||
username = prompt.ask('Username:') do |q|
|
username = prompt.ask('Username:') do |q|
|
||||||
q.required true
|
q.required true
|
||||||
q.default 'admin'
|
q.default 'admin'
|
||||||
|
|
Loading…
Reference in a new issue