title: Managing Sidekiq workers for multiple environments in Heroku using procfile
body: <p><a href="https://devcenter.heroku.com/articles/procfile#setting-local-environment-variables" rel="nofollow">The Heroku docs indicate</a> that you can set environment variables for use in the procfile. I'm attempting to do set a SIDEKIQ_CONCURRENCY variable, so that my staging environment allots fewer workers for Sidekiq than my production environment.</p>
  
  <p>I set the new variables like so:</p>
  
  <pre><code>heroku config:set SIDEKIQ_CONCURRENCY=3 --app mystaging
  heroku config:set SIDEKIQ_CONCURRENCY=15 --app myproduction 
  </code></pre>
  
  <p>Then I added the following line to my procfile:</p>
  
  <pre><code>worker: bundle exec sidekiq -c ENV[SIDEKIQ_CONCURRENCY]
  </code></pre>
  
  <p>I also tried this:</p>
  
  <pre><code>worker: bundle exec sidekiq -c $SIDEKIQ_CONCURRENCY
  </code></pre>
  
  <p>And when I deploy I get the following error in my logs:</p>
  
  <pre><code>invalid value for Integer(): "ENV[SIDEKIQ_CONCURRENCY]"
  </code></pre>