1234567891011121314151617181920212223242526272829303132333435363738 |
- worker_count = Integer(ENV['WEB_CONCURRENCY'] || 0)
- workers worker_count
- threads_count_min = Integer(ENV['MIN_THREADS'] || 5)
- threads_count_max = Integer(ENV['MAX_THREADS'] || 30)
- threads threads_count_min, threads_count_max
- environment ENV.fetch('RAILS_ENV', 'development')
- preload_app!
- if defined?(Puma::ControlCLI)
-
- old_verbose = $VERBOSE
- $VERBOSE = nil
- Puma::ControlCLI::CMD_PATH_SIG_MAP = Puma::ControlCLI::CMD_PATH_SIG_MAP.merge({ 'info' => 'SIGWINCH' }).freeze
- $VERBOSE = old_verbose
- end
- begin
- on_booted do
- AppVersion.start_maintenance_thread(process_name: 'puma')
- Zammad::ProcessDebug.install_thread_status_handler
- end
- rescue NoMethodError
-
-
- end
- if worker_count.positive?
- on_worker_boot do
- ActiveRecord::Base.establish_connection
- Zammad::ProcessDebug.install_thread_status_handler
- end
- end
|