title: Prevent initializer in rake tasks and rails console
body: <p>I'm working with Rails and Websockets listening.</p>
  
  <p>I created an initializer which starts listening on those websockets, so, when I push in production with Capistrano, the server doesn't stop listening on those Sockets for a long time. </p>
  
  <p>But, when I use something like <code>rails c</code>, <code>rake db:migrate</code> or something else, the initializer is called (I know this is normal), and I want to prevent this initializer processing on my <code>rails c</code> or <code>rake</code> tasks. PS : I use <code>unicorn</code> in production.</p>
  
  <p>Do you know how to prevent the initializer processing when it is not called by a unicorn launching? </p>