search for: set_no_auto_load

Displaying 14 results from an estimated 14 matches for "set_no_auto_load".

2008 Jan 18
8
Query All Worker
What does the method query_all_workers() do? There is no documentation on what this method returns (1.0.1 version). Orion -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080118/9f9b8112/attachment.html
2008 Mar 19
2
problem with worker status
...ere 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_count(file) register_status(:percent_complete => percent_complete, :total =>...
2007 Dec 15
10
1) Error 2) sending request to a specific worker
...r => :xmpp_worker, :job_key => :my_key) MiddleMan.ask_work(:worker => :xmpp_worker, :worker_method => :login, :data => "test") render(:partial=>''window'') end end class XmppWorker < BackgrounDRb::MetaWorker set_worker_name :xmpp_worker set_no_auto_load true def create(args = nil) end def login end end Can someone helps me ? 2) I am creating a worker with a key : MiddleMan.new_worker(:worker => :xmpp_worker, :job_key => :my_key) Is it possible to use this key in a request to send work to a specific worker ? Thanks for your help...
2008 Jun 04
0
Large requests break BackgrounDRb
...ed a bug in BackgrounDRb. It seems that when the data being requested is large (via send_request), say in the range of 64k+, it crashes or at least incapacitates BackgrounDRb. For example, take these two workers: class SmallWorker < BackgrounDRb::MetaWorker set_worker_name :small_worker set_no_auto_load(true) attr_reader :payload def create(args) @payload = ''s '' * 512 end end class LargeWorker < BackgrounDRb::MetaWorker set_worker_name :large_worker set_no_auto_load(true) attr_reader :payload def create(args) @payload = ''L'' * 65600...
2007 Dec 20
1
More pleasant / concise API
Hi there, Just a small suggestion : The following apis could be a bit more concise / shorter / pleasant I thought. This is particularly difficult, my brain stumbles on this each time when scanning thorugh the code :) set_no_auto_load(true) Could it be two apis instead? auto_load no_auto_load and the other one : worker_name :important_worker (no set_ prefix) thanks, emil
2008 Jan 10
8
Worker suicide
I have a worker which wants to delete itself after it finishes its work- how can it do that? Best Regards, Danny Burkes
2008 Apr 14
6
Good news: BackgrounDRb now works on Windows
...use it at all. It''s perfectly acceptable for a development machine, which is how I use Rails on Windows. (My project is going to deploy on something that ends in nix.) On the other hand if you''re going to be dynamically creating background workers (e.g. reload_on_schedule true or set_no_auto_load true) you''ll wait a while for the worker to start up on Windows. Will this slow startup time ever block a Rails server request? Not that I''ve seen. From what I''ve seen BackgrounDRb never starts a new worker process because of an API call. The only case I''ve seen...
2008 Jan 22
9
Cannot connect when spawning new workers on demand
Hi! I''m using the latest&greatest backgroundrb with rails 2.0.2 on ubuntu dapper. I''ve made an app that lets you run a query on several servers at once, which are selected at runtime. Therefore, for each server that is selected, I spawn a new worker and assign its work. After everything is completed, the workers are deleted. I often get this error:
2007 Dec 28
2
Arity?
...''t going quite as smoothly. I have a import worker that takes a number of parameters and then is started dynamically. Here''s the a snippet of the worker code: class PastPerfect4ImporterWorker < BackgrounDRb::MetaWorker set_worker_name :past_perfect4_importer_worker set_no_auto_load true # importer has the version of methods that will work in the context # of backgroundrb include Importer def create(args = nil) @successful = false @last_related_topic = nil @last_related_topic_pp4_objectid = nil @import_field_to_extended_field_map = Hash.new...
2007 Dec 17
7
Get "some read error" on calls to worker
...l get the "Some read error" message. I need the job to keep one worker per id. I''d rather have separate processes than go the thread route - for now. class UpdateFacebookAccountInfoWorker < BackgrounDRb::MetaWorker set_worker_name :update_facebook_account_info_worker set_no_auto_load true require "facebook_rails_controller_extensions" include RFacebook require ''activemessaging/processor'' include ActiveMessaging::MessageSender def create(args) puts "create=>"+ args.inspect exit! end end and th...
2008 Jan 11
18
getting started
Hey all, Been reading through all the old posts (and the docs) to familiarize myself but I still feel a bit lost. I''m on trunk and am having a bit of a hard time knowing where to start with the particular I''m trying to solve. So far, I''ve downloaded backgroundrb, done the basic rails setup, created my worker and started it using `script/backgroundrb start`.
2008 Jan 29
5
Authoritative Documentation
I''ve been using backgroundrb for... about an hour now. I must say, I''m impressed. But I''m a bit stumped on where to find the "official" documentation. There''s an API online at backgroundrb.rubyforge.org, but I don''t see the methods available for MiddleMan, etc. Right now, I''m trying to figure out how to get a list of all
2008 May 05
2
Deploying to a staging server using Capistrano: how to start up BackgrounDRb?
...on: :backgroundrb: :port: 33333 # use port 33333 :lazy_load: true # do not load models eagerly :debug_log: false # disable log workers and other logging My worker: class ThumbnailGeneratorWorker < BackgrounDRb::MetaWorker set_worker_name :thumbnail_generator_worker set_no_auto_load(true) def create(args = nil) register_status(:percent_complete => 0) args.each_with_index do |uploader_id, index| @uploader = Uploader.find(uploader_id) @uploader.generate_thumbnails percent_complete = ((index + 1) * 100) / args.length logger.info "...
2007 Dec 18
5
querying status of worker with job_key
Hi, Is it possible to start a worker with job_key and then ask_status of that specific worker with the job_key? MiddleMan.ask_work(:worker => :auth_worker, :job_key=>''1'', :worker_method => :auth) and then MiddleMan.ask_status(:worker => :auth_worker, :job_key=>''1'') >From my testing of the new backgroundrb, asking status using job key