[Backgroundrb-devel] Session access interfers with other modelaccess

Michael D'Auria michael.dauria at gmail.com
Tue Oct 17 17:13:29 EDT 2006


Are there any logs we can look at?  In dev mode we can see MySQL logs

On 10/17/06, Bill Walton <bill.walton at charter.net> wrote:
>
> Update...
>
> I explicitly generated a Session model and that made things a little
> better.
> I can uncomment the lines below and now the Emrec DOES get deleted.
> However, if I try to also delete the Session record, neither gets deleted.
> Any ideas what gives?
>
> Thanks,
> Bill
>
> ----- Original Message -----
> From: "Bill Walton" <bill.walton at charter.net>
> To: "BackgroundRb" <backgroundrb-devel at rubyforge.org>
> Sent: Tuesday, October 17, 2006 3:21 PM
> Subject: [Backgroundrb-devel] Session access interfers with other
> modelaccess
>
>
> > Sorry to be such a bother but I'm not getting this.
> >
> > I have two models: Emrec and Session (I'm using AR for session
> mgmt.)  In
> > my
> > worker I can access the Emrec model and delete a record, AS LONG AS I
> > don't
> > try to access the Session model.  With the Session model access
> commented
> > out as below, the Emrec record gets deleted.  If I uncomment those
> lines,
> > the Emrec record is _not_ deleted.  Any idea what I'm doing wrong?
> >
> > Thanks,
> > Bill
> >
> >
> > In my controller...
> >
> >    @session_id = session.session_id
> >    session[:job_key] = MiddleMan.new_worker(:class => :foo_worker,
> >                                             :args => {:emrec_id =>
> > @emrec.id,
> >                                                           :session_id =>
> > @session_id})
> >
> >
> > In my worker...
> >
> >  def do_work(args)
> >    @time_remaining = 7
> >    @emrec_id = args[:emrec_id]
> >
> >    #@session_rec = Session.find(:first,
> >    #                       :conditions => ["sessid = ?",
> > args[:session_id]])
> >
> >    calculate_the_meaning_of_life(args)
> >    Emrec.delete(@emrec_id)
> >  end
> > _______________________________________________
> > Backgroundrb-devel mailing list
> > Backgroundrb-devel at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/backgroundrb-devel
> >
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20061017/9ab43663/attachment.html 


More information about the Backgroundrb-devel mailing list