[Backgroundrb-devel] RESOLVED: Session access interfers with other model access
ezmobius at gmail.com
Thu Oct 19 11:51:54 EDT 2006
On Oct 19, 2006, at 6:19 AM, Bill Walton wrote:
> Bill Walton wrote:
>> If I start a new browser (i.e., a new session) and
>> point it to the app, the find in the worker fails and
>> so the delete of the session record fails. Problem is,
>> I can see the record (via MySQL-Front) in the table
>> prior to the worker attempt to find it. Why does the
>> find fail?
> I still do not understand why I can see the record in the table via
> MySQL-Front but Rails / BackgrounDRb cannot find it, but I figured
> out how
> to fix the problem.
> Doing a session.update in the controller prior to the Middleman
> call somehow
> puts the record in a state where the find in the worker on the
> sessid field
> Hope this helps someone in the future. If anybody can explain
> what's going
> on with the session I'd be very interested to learn.
> Best regards,
Ahh good catch Bill. That makes total sense though. When you call
the middleman from a rails action without doing the session.update,
the session record is still in memory and not written to the db yet.
update makes it write out the session into the db.
Glad you got it working.
-- Ezra Zygmuntowicz
-- Lead Rails Evangelist
-- ez at engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)
More information about the Backgroundrb-devel