Displaying 3 results from an estimated 3 matches for "uploadwork".
Did you mean:
uploadform
2008 Mar 19
2
problem with worker status
Hi,
I have a page were users can start jobs that may take several hours to
run. BackgrounDrb is perfect for me and seems to be working well most of
the time but some times I have the following problem:
My worker is set up like this:
class 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_cou...
2006 Jul 24
0
Mongrel + BackgrounDRb + File Column = Upload Progress Bar?
...>= 100
end
else
redirect_to :action => ''index''
end
end
def done
MiddleMan.delete_worker(session[:job_key])
redirect_to :action => ''edit_songs''
end
Just for clarity sake, here''s my upload_worker class:
class UploadWorker < BackgrounDRb::Rails
attr_reader :progress
def do_work(args)
@progress = 0
start_working
end
def start_working
Thread.new do
while @progress < 100
sleep rand / 2
a = [1,3,5,7]
@progress += a[rand(a.length-1)]
if @prog...
2006 Jul 24
4
Mongrel + BackgrounDRb + File Column = Upload Progress Bar?
...>= 100
end
else
redirect_to :action => ''index''
end
end
def done
MiddleMan.delete_worker(session[:job_key])
redirect_to :action => ''edit_songs''
end
Just for clarity sake, here''s my upload_worker class:
class UploadWorker < BackgrounDRb::Rails
attr_reader :progress
def do_work(args)
@progress = 0
start_working
end
def start_working
Thread.new do
while @progress < 100
sleep rand / 2
a = [1,3,5,7]
@progress += a[rand(a.length-1)]
if @prog...