Displaying 1 result from an estimated 1 matches for "get_total_count".
2008 Mar 19
2
problem with worker status
...ss UploadWorker < BackgrounDRb::MetaWorker
set_worker_name :upload_worker
set_no_auto_load(true)
def create(args = nil )
file = args[:file]
sample_id = args[:sample_id]
@user_id = args[:user_id]
@submission_time = Time.now
percent_complete = 0
total_count = get_total_count(file)
register_status(:percent_complete => percent_complete, :total =>
total_count)
<<< some long running task >>>
exit
end
end
Now when I fire up the backroundrb server and a rails console
and ask for a new worker like this:
>> jk = MiddleMan.new_worker(:...