mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 09:03:45 +08:00
28292d2759
Previously we had many places in the app that called `hostname` to get hostname of a server. This commit replaces the pattern in 2 ways 1. We cache the result in `Discourse.os_hostname` so it is only ever called once 2. We prefer to use Socket.gethostname which avoids making a shell command This improves performance as we are not spawning hostname processes throughout the app lifetime |
||
---|---|---|
.. | ||
base.rb | ||
rails_autospec.rb | ||
sidekiq.rb |