1
0
Fork 0

Improve code

This commit is contained in:
Alex Kotov 2018-12-06 04:36:08 +05:00
parent a4eac65433
commit 1270a7072c
No known key found for this signature in database
GPG key ID: 4E831250F47DE154

View file

@ -1,7 +1,5 @@
# frozen_string_literal: true
root_dir = File.expand_path('../..', __dir__).freeze
workers_count = ENV.fetch('WEB_CONCURRENCY') { 1 }
threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 }
@ -31,4 +29,7 @@ threads threads_count, threads_count
# Bind the server to "url". "tcp://", "unix://" and "ssl://" are the only
# accepted protocols.
#
bind "unix://#{File.join(root_dir, 'tmp', 'sockets', 'puma.sock')}"
bind "unix://#{Rails.root.join('tmp', 'sockets', 'puma.sock')}"
# Allow puma to be restarted by `rails restart` command.
# plugin :tmp_restart