search for: session_rec

Displaying 2 results from an estimated 2 matches for "session_rec".

2006 Oct 17
6
Session access interfers with other model access
...=> :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
2007 Feb 20
1
error message for record not found ?
...#39; script/backgroundrb/start:108 ------------ Worker code ---------- class SessionWorker < BackgrounDRb::Rails attr_reader :time_remaining def do_work(args) @time_remaining = args[:initial_setting].to_i @emrec_id = args[:emrec_id] @session_id = args[:session_id] @session_rec = Session.find(:first, :conditions => ["sessid = ?", @session_id]) watch_session(args) sleep(2) clean_up end def watch_session(args) while @time_remaining > 0 sleep(1) emrec = Emrec.find(@emrec_id) if emrec !...