From 24f5ba7029d84cb01b2c7bfb809c6861a2bdb68e Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Thu, 29 May 2014 21:26:11 -0700 Subject: [PATCH] Prefer DYNO name over system hostname on Heroku, fixes #1742 --- Changes.md | 6 ++++++ lib/sidekiq/util.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Changes.md b/Changes.md index b9b0ab64..fbdbf39d 100644 --- a/Changes.md +++ b/Changes.md @@ -1,3 +1,9 @@ +3.1.3 +----------- + +- Use ENV['DYNO'] on Heroku for hostname display, rather than an ugly UUID. [#1742] + + 3.1.2 ----------- diff --git a/lib/sidekiq/util.rb b/lib/sidekiq/util.rb index e1fe1a9a..1b3d3f94 100644 --- a/lib/sidekiq/util.rb +++ b/lib/sidekiq/util.rb @@ -27,7 +27,7 @@ module Sidekiq end def hostname - Socket.gethostname + ENV['DYNO'] || Socket.gethostname end def identity