[Backgroundrb-devel] Could a BackgrounDrb worker do this?
Bill Walton
bill.walton at charter.net
Fri Sep 15 12:08:48 EDT 2006
Hi Michael,
Michael Siebert wrote:
> erm... i have an idea...
> use activerecord session store and when the
> user logs in, create a bgdrb worker. this worker
> is responsible for deleting the users session and
> data after a certain amount of time (the timeout).
That's pretty much Ezra suggested earlier.
> now, in a before_filter, get your worker (hope
> you saved the worker id) and update the timeout
> somehow.
Yep.
> would that aproach satisfy all of your requirements?
I'm still getting my arms around how it would work, exactly, but I think
this is the track I'm going to take. The worker will be responsible for
deleting the session whether the visitor explicitly logs out, times out with
their browser still open, or abandons the session by closing/redirecting the
browser.
I've not done much with processing in the model and that's probably a
material part of why I'm having trouble with getting my arms around how this
would work. As long as I can delete the files referenced in the DB before
the DB record that identifies them gets deleted it should work.
Thanks for your help!
Bill
More information about the Backgroundrb-devel
mailing list