Displaying 17 results from an estimated 17 matches similar to: "Thread Pool Size?"
2006 Jul 26
4
BackgrounDRb - uninitialized constant
I installed BackgrounDRB as instructed:
script/plugin install svn://rubyforge.org//var/svn/backgroundrb
rake backgroundrb:setup
I started it with:
rake backgroundrb:start
In a model I make the call:
MiddleMan.new_worker :class => :rss_worker
In /lib/workers I have file rss_worker.rb, which contains the class:
Class RssWorker < BackgrounDRb::Rails
def do_work(args)
...
end
end
2008 Jan 22
2
Threadpool and queuing of tasks
I recently switched over to v1.0, and things are rolling along pretty well.
However, one thing that has always been a little confusing to me is knowing
when to use thread_pool. Since most of my bgrb workers are called from my
web app to process rather than being scheduled, I''m using the thread_pool
for every call. Unfortunately, that means that I have to split up workers
by how many
2007 Apr 30
1
monit config?
Anyone have a a good monit config section for bgrb?
I''m thinking something like this:
check process backgroundrb with pidfile
/var/www/apps/foo/current/log/backgroundrb.pid
start program = "/var/www/apps/foo/current/script/backgroundrb start"
stop program = "/var/www/apps/foo/current/script/backgroundrb stop"
if failed host 127.0.0.1 port 2000 then restart
2009 Feb 16
1
MiddleMan.new_worker => nil
I''ve been checking out all the async gems and plugins for Rails, and
decided to give BackgroundRb a shot. Unfortunately, I''ve not even been
able to get past the initial stages.
Whenever I call MiddleMan.new_worker, it invariably returns nil. The
log file remains empty.
I''ve only tried this from the console so far. If I can''t even do this
successfully,
2006 Nov 16
1
Assigning to results - missing something
Hi,
I''m trying to convert an app to use 0.2.0, and having a little trouble
understanding how to use the results hash.
Formerly my worker had an instance variable, @file_stats which was
initialized to an empty hash; I have replaced @file_stats with
results[:file_hash]. Actually my initial pass at this was just to do a
s/@file_stats/results[:file_hash]/. Which gets me the following:
2007 Feb 05
1
long jumping out of code in specs
I wrote this abomination just now, and wonder if anyone else has had
experience with the pattern behind it. In short, I''m specing an
after_create hook on an ActiveRecord model, that calls a bunch of
private methods. Instead of stubbing all those private methods (which
is verboten anyway, as well as impossible because creating the object
which owns those methods is what I''m
2007 Feb 03
3
Backgroundrb-devel Digest, Vol 9, Issue 1
Hi Bill,
I have "version 1" backgroundrb running on my development server with
rails 1.2.1, with no issues (other than the left over DB connections
blocking up my MySQL server, which isn''t exactly a new problem).
Going to move production servers to rails 1.2.1 very soon, I''ll post
back if there''s any trouble.
Still would *really* like to get version
2007 Dec 19
6
thread_pooling sleeping
I''m trying to run a single worker that could perform a periodic task
for a given user.
>From a controller, I imagine something like:
def start_job
MiddleMan.ask_work(:worker => :foo_worker, :worker_method => :perform_task,
:data => { :user_id = current_user.id })
end
def check_job
@status = MiddleMan.ask_status(:worker => :foo_worker)[current_user.id]
end
2006 Oct 14
1
Setting environment
Not sure this is known behaviour but it seems that if want to set the
environment to, for example, test, and you want to use Active Record you
have to both explicitly set the RAILS_ENV and the BackgrounDRb environment.
So, if you have a config file backgroundrb_test.yml (as well as the
default) and set the environment to test in that, this is what *seems*
to happen:
$
2008 Mar 26
1
bgrb won''t start
I get the error when trying to start backgroundRb 1.0.3 running on Rails 1.2.6
./backgroundrb start
./backgroundrb:11:in `require'': no such file to load -- /var/www/test/vendor/plugins/backgroundrb/config/boot.rb (LoadError)
from ./backgroundrb:11
is 1.0.3 able to run on rails 1.26 ?
this was my thought as to why it wasn''t working
unfortunately i cannot upgrade rails
2008 Jan 22
11
Unable to load Models which reference plugins?
I''m using a plugin which adds a method to ActiveRecord::Base
http://similetimelinerailshelper.googlecode.com/svn/trunk/simile_timeline/
This adds an "acts_as" type declaration to the Models, via the file in
vendor/plugins/simile_timeline/lib/simile_timeline.rb Rails is working
with these declarations, and they are being used successfully in
''regular
2007 Dec 21
0
rake test:plugins gives uninitialized constant RAILS_ROOT
Hello,
Just upgraded to the the latest backgroundRb.I am getting an error
when i run the task "rake test:plugin". Any idea why I am getting this?
Here is the error message:
/usr/bin/ruby1.8 -Ilib:test
"/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader.rb"
"vendor/plugins/backgroundrb/test/master_worker_test.rb"
2007 Jan 22
7
Yet Another Problem with BackgroundRB
Hi!
My cron-based worker is being indeed invoked by backgroundRB at
correct times. But... After several runs it can no longer find DB
columns! The same query, which was running OK an hour ago starts to
throw MySQL error about unkown column in where clause. If I restart
backgroundrb it works for some time but stops working after several
invocations.
Has anyone epxerienced the similar beahviour?
2006 Nov 21
0
Reusable workers
Hello,
I''m using the scheduler to create several reusable workers of the same type,
.e.g., RSSWorker, so I can avoid the overhead of initializing new processes
(as suggested by Ezra to my previous question). Creating new workers through
the external yaml seems pretty straightforward, but my question is is there
a way to call these workers without using the job key? Currently, to use
2007 Dec 23
0
Updates and Fixes and more of awesome stuff
1. Whenever you ask BackgrounDRb to perform a particular task using:
MiddleMan.ask_work(:worker => :rss_worker,:worker_method =>
:fetch_url, :data => "www.google.com")
Your task would be performed then and there. But, if your worker is
busy, task won''t be queued, except in socket buffer.
And your request may get lost. This isn''t generally a problem
2006 Sep 04
2
Is it better to rebuild or update my notebook for 4.4
Wow!
With all the conversations here, and some things on my system, I am
seriously thinking of taking another drive, install 4.4 on it, and then
move my /home partition (I planned for such eventualities by putting
/home on its own partition).
Couple of questions:
I did my current build with a ks.cfg on a floppy.
Can I use the same information for 4.4 as I did for 4.3? That is
none of
2007 Apr 26
5
Is There an Alternative to MEMDISK ?
This isn't an esp urgent issue, but I'd like to use a certain RAM diagnostic (Doc Mem) which I've already posted a note about a couple of months ago. Simply won't work booting the floppy disk image via MEMDISK. In the interim, I've tried to resolve this by changing things on my side. I'm pretty sure it's a XMS incompatibility, as it fails differently depending on