title: perform_async not working in sidekiq
body: <p>I'm trying to use sidekiq to process some requests in background (it's integrated with padrino framework).</p>
  
  <p>My expectation was that once the worker got called, the request handler would return immediately the answer to user.</p>
  
  <p>In order to be sure it was working properly I implemented a worker that would print some messages and sleep for some 44s prior to finish it's processing (to simulate a long processing in background).</p>
  
  <p>For my surprise, the request got stuck until the worker had the job finished. Only after that the request handler could return an answer to user.</p>
  
  <p>At first I thought that the sleep function could be the problem, so I replaced the sleep function by a busy while but I have the same behavior: the request handler got hanged until the worker finished its task.</p>
  
  <p>Any idea why is this happening?</p>
  
  <p>You can see the following :</p>
  
  <p>request handler:</p>
  
  <pre><code>get :hardworker, map: '/hardworker' do
    logger.info "I'll call HardWorker"
    HardWorker.perform_async(44)
    logger.info "HardWorker was called"
    return "The job should still be running in background."
  end
  </code></pre>
  
  <p>Sidekiq worker:</p>
  
  <pre><code>class HardWorker
    include Sidekiq::Worker
  
    def perform(count)
  
      logger.info "Doing hard work"
      Sidekiq.redis { |c| logger.info "redis location: [#{c.client.location }]" }
  
      redis_info = Sidekiq.redis { |conn| conn.info }
      logger.info "connected clients: [#{redis_info['connected_clients']}]"
  
      sleep count
  
      logger.info "hard work was done"
    end
  end
  </code></pre>
  
  <p>The redis server is running:</p>
  
  <pre><code>ps -ef | grep redis
  </code></pre>
  
  <p>returns </p>
  
  <pre><code>redis     1232     1  0 16:54 ?        00:00:09 /usr/bin/redis-server 127.0.0.1:6379
  </code></pre>
  
  <p>as well as sidekiq server:</p>
  
  <pre><code>bundle exec sidekiq -r ./config/boot.rb -v
  2015-06-06T20:31:26.207Z 3343 TID-8614g INFO: Booting Sidekiq 3.3.4 with redis options {:url=&gt;"redis://127.0.0.1:6379/0", :concurrency=&gt;25}
  </code></pre>
  
  <p>Also, from logs I put in the worker we can see that client apparently is connected to redis:</p>
  
  <pre><code>INFO -  redis location: [127.0.0.1:6379]
  INFO -  connected clients: [3]
  </code></pre>
  
  <p>sidekiq version: 3.3.4
  redis server: 2.8.4
  ruby: 2.1.2p95</p>
  
  <p>Note: I mounted sidekiq web tool on my padrino and it shows 0 for all stats (Processed, Failed, Busy, Enqueued, Retries, Scheduled, Dead) both prior and after the worker has executed.</p>
  
  <p>The sample project can be downloaded from here: <a href="https://github.com/plicatibu/sidekiq-problem.git" rel="noreferrer">https://github.com/plicatibu/sidekiq-problem.git</a></p>