Skip to content

Commit

Permalink
Only log if actually renicing
Browse files Browse the repository at this point in the history
  • Loading branch information
gdb committed Jan 22, 2013
1 parent 76291d6 commit e8f90df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/einhorn.rb
Expand Up @@ -252,8 +252,11 @@ def self.renice_self(master)
else
nice = Einhorn::State.nice[:worker]
end
log_info("Renicing self to #{master ? 'master' : 'worker'} level #{nice}")
renice($$, nice) if nice

if nice
log_info("Renicing self to #{master ? 'master' : 'worker'} level #{nice}")
renice($$, nice)
end
end

def self.renice(pid, nice)
Expand Down

0 comments on commit e8f90df

Please sign in to comment.