discourse/app/jobs
Sam Saffron 28292d2759
PERF: avoid shelling to get hostname aggressively
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
2020-02-18 15:13:19 +11:00
..
concerns DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
onceoff DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
regular FIX: Mitigate issue where legacy pre-secure hotlinked media would not be redownloaded (#8802) 2020-01-29 10:11:38 +10:00
scheduled FEATURE: Send suspect users to the review queue (#8811) 2020-01-29 15:38:27 -03:00
base.rb PERF: avoid shelling to get hostname aggressively 2020-02-18 15:13:19 +11:00