Displaying 2 results from an estimated 2 matches for "clearsessionsworker".
2006 Sep 25
1
Clearing ActiveRecord Sessions
Hello all,
I am interested in using BackgrounDRb to clear out ActiveRecord based
sessions. I have this working, just with a small hitch, here is the code:
class ClearSessionsWorker < BackgrounDRb::Rails
repeat_every 7.minutes
first_run Time.now
def do_work(args)
Session.destroy_all(["updated_at < ?", 20.minute.ago ])
end
end
It''s not very complicated and does remove sessions, it''s just that once the
job is done, the thread han...
2006 Oct 16
6
accessing session data in worker
Is there something special I need to do to access session data in a worker?
I''m using an AR session store. I''ve been working with Ezra''s tutorial, modifying it a little here and there to figure it out. So I changed the progress bar to a simple count-down in the worker which sends back the count to display in the view. No big deal. But if I try to access session