Displaying 3 results from an estimated 3 matches for "mscworker".
2007 Dec 21
7
Using my models
I''m working on upgrading my app to the latest version of backgroundrb.
Everything went find until I tried to execute my tasks.
Here is my simple worker for testing:
class MscWorker < BackgrounDRb::MetaWorker
set_worker_name :msc_worker
def create(args = nil)
# this method is called, when worker is loaded for the first time
end
# Send a message to everyone
def send_message_to_all(args = nil)
Message.send_to_everyone(args[:sender], args[:subject], args[:bod...
2008 Jan 03
1
Memory leak and long process problem
...g issues
with one in particular. Two large tasks for me are importing people and
updating companies.
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 "MscWorker#import_contacts failed! #{err.class}:
#{err}"
end
end
end
def update_company_from_vendor(args = nil)
thread_pool.defer(args) do |company_id|
begin
company = Company.find(company_id)
info = company.firm_info_from_vendor # webservice call to vendor...
2008 Jan 03
0
Strange problem
...g issues
with one in particular. Two large tasks for me are importing people and
updating companies.
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 "MscWorker#import_contacts failed! #{err.class}:
#{err}"
end
end
end
def update_company_from_vendor(args = nil)
thread_pool.defer(args) do |company_id|
begin
company = Company.find(company_id)
info = company.firm_info_from_vendor # webservice call to vendor...