Workling not running tasks in background
- by alex
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!