Displaying 1 result from an estimated 1 matches for "process_all_ready".
2008 Jan 03
1
Thread_pool bug?
...moved
my import contacts worker to its own file and set the pool_size to 1.
class ImportContactsWorker < BackgrounDRb::MetaWorker
set_worker_name :import_contacts_worker
pool_size(1)
def create(args = nil)
# Restart any import jobs that didn''t complete or start
ImportJob.process_all_ready
end
def import_contacts(args = nil)
thread_pool.defer(args) do |job_id|
begin
job = ImportJob.find(job_id)
job.process_job
rescue => err
logger.error "ImportContactsWorker(#{job_id}) failed! #{err.class}:
#{err}"
end
end
end
end...