search for: t_user

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

Did you mean: __user
2006 Jan 12
1
A really newbie question
...ass User < ActiveRecord::Base attr_writer :alias, :email def self.newuser?(p_alias, p_email) user = find_first(["alias = ? OR email = ?", p_alias, p_email]) if user.nil? return true else return false end end def self.addupdate(p_alias, p_email) t_user = find_first(["alias = ? OR email = ?", p_alias, p_email]) if t_user.nil? t_user = User.new(:alias => p_alias, :email => p_email, :name => "", :password => "") else t_user.alias = p_alias t_user.email = p_email end t_user....
2007 Dec 19
6
thread_pooling sleeping
I''m trying to run a single worker that could perform a periodic task for a given user. >From a controller, I imagine something like: def start_job MiddleMan.ask_work(:worker => :foo_worker, :worker_method => :perform_task, :data => { :user_id = current_user.id }) end def check_job @status = MiddleMan.ask_status(:worker => :foo_worker)[current_user.id] end My worker is something like: class FooWorker < BackgrounDRb::MetaWorker set_worker_name :foo_worker def create(args=nil) @mutex = Mutex.new @mutex.synchronize do @status...