similar to: can a worker commit suicide?

Displaying 20 results from an estimated 6000 matches similar to: "can a worker commit suicide?"

2006 Sep 01
8
Worker suicide
Hi the list people, hi Ezra, I just read from this message http://rubyforge.org/pipermail/backgroundrb-devel/2006-July/000134.html that BackgrounDRb will offer a way to kill a worker from within itself. As this message is from 7/25, I wonder if this feature has been added since. If not, is there any way to do it? I tried this: MiddleMan.delete_worker(@_job_key) But it raise: uninitialized
2006 Oct 16
6
accessing session data in worker
Is there something special I need to do to access session data in a worker? I''m using an AR session store. I''ve been working with Ezra''s tutorial, modifying it a little here and there to figure it out. So I changed the progress bar to a simple count-down in the worker which sends back the count to display in the view. No big deal. But if I try to access session
2006 Oct 17
6
Session access interfers with other model access
Sorry to be such a bother but I''m not getting this. I have two models: Emrec and Session (I''m using AR for session mgmt.) In my worker I can access the Emrec model and delete a record, AS LONG AS I don''t try to access the Session model. With the Session model access commented out as below, the Emrec record gets deleted. If I uncomment those lines, the Emrec
2006 Aug 24
3
A new QueueWorker class
Hello all, I''ve come up w/ a worker class that manages queued jobs using a fixed number of child workers. Well, that''s not quite true -- a new worker is spawned for each job, but you set the total number that may exist at once. There are three components: 1) queue_worker.rb: The singleton worker that manages the child workers. You probably want to auto start this. Make sure you
2008 Jan 03
7
Delete a busy worker
I thought I could delete a busy worker by calling MiddleMan.delete_worker, but doesn''t seem to end. I believe this was possible in 0.2, is it not in 1.0? thanks, Zach -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080103/0c701f29/attachment.html
2006 Jul 18
7
backgroundrb and autotest
Hi, First, thanks for the plugin. Sorry if this is not strictly a backgroundrb issue but I thought others on this list might have come across this problem. I''m trying to run the test that comes via the worker generator. The test works fine when running ''rake test_functional'', but when the tests are run by autotest I get "uninitialized constant BackgrounDRb"
2006 Aug 07
4
Memory leak?
I am using BackgrounDRb to resize images after they are accepted into our system. However, it has become clear that this creates a memory leak. I''m not sure exactly where the leak exists, but I don''t think it''s in my own code as it is presently being used in production and has resized thousands of images without a leak occurring, thanks to calling GC.start
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
2006 Aug 16
7
Forward of moderated message
OK I know whats happening. Your while loop completes and calls kill on the worker before your task_progress controller method ever gets called> So the worker is deleted and when you try to access it from rails you get an error because there is no longer a worker at that job key. The kill method is meant to be used within a worker that you fire and forget. If you want to get the
2007 Sep 24
3
Trouble using backgroundrb
Hi all, I''m a newbie to backgroundrb and am having trouble integrating it into my rails-app. I''m using namespaces to differentiate between the parts of my app. When I want to create a new worker, it seems that it cannot find the worker object. Here''s my code: -------------------- controller app/passwd/index -------------------- class Passwd::IndexController <
2006 Jul 01
9
BackgrounDRb New release.
Howdy Folks- I''m happy to announce a new release of BackgrounDRb! I have added quite a few new features and included some nice patches from folks on the list. $ script/plugin install svn://rubyforge.org//var/svn/backgroundrb All of the code now stays within the plugin and the start and stop scripts are now just stubs. This makes it easier to tweak or figure out how it works.
2007 Feb 20
1
error message for record not found ?
I''m using backgroundrb for session management and deletion of visitor-entered information when a session is abandoned. The visitor can either click a button to end their session and remove their data, or backgroundrb will do it for them after 5 minutes of inactivity. Everything''s working fine, I think. If the visitor explicitly logs out, then when the worker checks for their
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`.
2006 Jul 13
4
Update
Folks- I just commited another revision of the plugin. Nothing huge in this update but some extra features. Acl lists are now configurable in the config file. So you will want to blow away and recreate your config file again. Thanks to Georg Friedrich for this. And I applied Gunter Ladwig''s patch for singleton worker classes. These are workers that only have one instance of
2007 May 22
4
Recommendations for eternally-running backgroundrb workers?
I''ve got some workers that I want to have running all the time. Right now I''m just launching them manually, by requesting a special page in my rails app that includes lines like: MiddleMan.new_worker(:class=> :receiver, :job_key=>:r, :args=>{:sleep_time=>10}) This strikes me as a really weak way to fire up my workers. I basically want to automate things so
2006 Jul 31
1
delete_worker doesn''t kill the thread?
I made a worker that run an infinite loop and does the following: while true @logger << "logging #{Time.now}" sleep 2 end In my secong console I did: tail log/backgroundrb.log -f This is so I could see the line getting added to the log every 2 seconds. Then in my other console I started script/console and created a new worker. Then killed it with
2008 Jan 04
1
Updates and Fixes on Trunk
Hi, I am pushing some updates and fixes that addresses much of the issues that we talked about since last couple of days. 1. Use configuration option :debug_log: false to disable backgroundrb_debug.log. 2. As shown below, use lazy_load option to disable aggressive loading of models ( and somewhat stupid too). 3. MiddleMan.delete_worker(:worker => :foo_worker) will now ABORT the worker, it
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:
2006 May 15
10
BackgrounDRb background task runner and Application Wide Context Store
Friends- I''m happy to annouce the first alpa release of BackgrounDRb. This is a small framework for managing long running background tasks that allows for ajax progress bars and more. It also serves as an Application wide cache and context store for when you need something like sessions but shared between users and multiple backend processes like fcgi''s or mongrels.
2006 Oct 17
2
accessing args in worker
If, in the controller, I start a worker and pass in an argument like this: session[:job_key] = MiddleMan.new_worker(:class => :foo_worker, :args => {:emrec_id => @emrec.id}) How do I access the value in the worker? I can''t seem to figure it out ;-p Thanks! Bill -------------- next part -------------- An HTML attachment was