[Backgroundrb-devel] Session access interfers with other model access

Bill Walton bill.walton at charter.net
Tue Oct 17 16:21:34 EDT 2006

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?


In my controller...

    @session_id = session.session_id
    session[:job_key] = MiddleMan.new_worker(:class => :foo_worker,
                                             :args => {:emrec_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 = ?", 


More information about the Backgroundrb-devel mailing list