rubocop: fix various style issues.

This commit is contained in:
evazion
2019-12-22 16:21:58 -06:00
parent 09f6a84660
commit 309821bf73
288 changed files with 912 additions and 962 deletions

View File

@@ -14,7 +14,7 @@ user 'danbooru', 'danbooru'
# Fill path to your app
working_directory app_path
# Should be 'production' by default, otherwise use other env
# Should be 'production' by default, otherwise use other env
rails_env = ENV['RAILS_ENV'] || 'production'
# Log everything to one file

View File

@@ -5,7 +5,7 @@ app_path = "/var/www/danbooru2/current"
worker_processes 20
timeout 180
#listen "127.0.0.1:9000", :tcp_nopush => true
# listen "127.0.0.1:9000", :tcp_nopush => true
listen "/tmp/.unicorn.sock", :backlog => 512
# Spawn unicorn master worker for user apps (group: apps)
@@ -41,7 +41,7 @@ run_once = true
before_fork do |server, worker|
# the following is highly recomended for Rails + "preload_app true"
# as there's no need for the master process to hold a connection
defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect!
defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect!
# Occasionally, it may be necessary to run non-idempotent code in the
# master before forking. Keep in mind the above disconnect! example

View File

@@ -14,7 +14,7 @@ user 'danbooru', 'danbooru'
# Fill path to your app
working_directory app_path
# Should be 'production' by default, otherwise use other env
# Should be 'production' by default, otherwise use other env
rails_env = ENV['RAILS_ENV'] || 'staging'
# Log everything to one file
@@ -26,8 +26,8 @@ pid "#{app_path}/tmp/pids/unicorn.pid"
before_fork do |server, worker|
old_pid = "#{server.config[:pid]}.oldbin"
if File.exists?(old_pid) && server.pid != old_pid
if File.exist?(old_pid) && server.pid != old_pid
begin
Process.kill("QUIT", File.read(old_pid).to_i)
rescue Errno::ENOENT, Errno::ESRCH
@@ -44,4 +44,4 @@ after_fork do |server, worker|
if defined?(ActiveRecord::Base)
ActiveRecord::Base.establish_connection
end
end
end