Workling not running tasks in background

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-05-13T19:32:39Z Indexed on 2010/05/13 19:34 UTC
Read the original article Hit count: 347

Filed under:
|

Hi,

I followed the railscast that describes how to get workling running background tasks, but can't get it working. The task runs, but not in the background (it's taking 5 secs before I'm redirected to admin_path).

Here is what my code looks like:

class AdminWorker < Workling::Base
  def test_workling(options)
    sleep 5
  end
end

class AdminController < ApplicationController
  def test_workling
    AdminWorker.async_test_workling
    flash[:notice] = "Doing stuff in the background"
    redirect_to admin_path
  end
end

What am I doing wrong? How to debug?

Thanks!

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about workling