Displaying 20 results from an estimated 1000 matches similar to: "MiddleMan.new_worker => nil"
2007 Apr 04
6
Exception when doing DRb remote calls from a BackgrounDRb worker
Hello,
I am trying to make DRb calls to a external server from a backgrounDRb
worker, but I''m getting always the next exception when I make the remote
call.
> ERROR:
> drbunix:///tmp/backgroundrb.11175/experimenter_worker_3e899de945f0803a82cd257cfac316d0_0_0.0738904928422051
> - #<Errno::ENOENT: No such file or directory -
>
2008 Sep 08
2
Problems with async worker request
Sorry if this comes through twice. I already sent this once, before joining
the mailing list.
I''m attempting to use Backgroundrb to handle asynchronous pdf creation, but
in doing so, I''ve run into a very strange problem. Below is a method that''s
called from the controller which creates a new worker, then grabs the worker
and calls the ''build_pdf''
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
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
2006 Dec 08
3
Thread Pool Size?
Hi All,
It might be lack of sleep, but I am struggling to accurately limit our pool
size. It seems like I can specify it on the server with the -s command
line option and also on the client via the YAML pool_size. Is that right?
Which one wins?
Our problem is that we are getting about 40 threads on each backgroundrb box
and it''s flooring our db and each bgrb box.
We want around 8.
2007 Jun 06
2
struggling with stability
Greetings all,
Unit tests are passing, but I''m having mucho problems getting brb to
run without exceptions for more than 6 hours.
I''m seeing a mixture of the following 2 exceptions:
20070605-11:26:56 (21497) failed to find slave socket - (RuntimeError)
20070605-11:26:56 (21497) /usr/local/lib/ruby/gems/1.8/gems/
slave-1.2.1/lib/slave.rb:435:in `initialize''
2006 Dec 07
2
backgrounDRb problems with results and MiddleMan
Hi there,
I''ve been experimenting with implementing BackgroundDRb in my rails app but
am running into some problems.
The primary problem I''m getting is in cleaning up worker threads, or getting
any kind of response out of worker threads.
If try using the response function/hash in my Worker the worker will not
execute reporting that response is an unknown variable or function.
2007 Mar 07
10
MiddleMan.worker blocks?
Hello -
I am observing that calls to MiddleMan.worker return only after the worker
has completed its work. This puzzles me, and I presume that I am doing
something wrong. Can anyone make suggestions?
Snippets from my code are:
class ReportController < SecurityController
...
def create_xml_report(report,start_time)
constraints = get_constraints(report,start_time,false)
2007 Jan 15
6
Instantiating middleman and worker from inside a model?
In short: how (if possible) would i go about arranging it so that i
can instantiate a middleman and set a worker going from within a
method in one of my models? or is this a weird thing to be wanting to
do? (
My specific situation: I have an ''Image'' model in my application. An
actual image file associated with the model is being stored on
amazons s3 system.
2007 Feb 01
3
with-arguments block is executed regardless of method?
I have a test case where I''m stubbing one method (''jobs''), and
mocking another (''new_worker'')
MiddleMan.stubs(:jobs)
MiddleMan.expects(:new_worker).with{|args| args[:class]
==:download_worker}
MiddleMan.jobs()
The above code results in an error ("The error occurred while
evaluating nil.[]") - calling ''jobs'' results in
2006 Oct 16
0
MiddleMan singleton issue in start script
Hi all,
I found this thread in the August backgroundrb-devel archives.
>This means that in order to reference the new_worker method *in the
>instance that is running in the drb server* you can''t do that
>directly. In order to spawn other workers from within a worker I
>would have to change the MiddleMan class to be a singleton. This way
>you could grab the one instance of
2006 Aug 07
2
Autostarting and job keys...
I''ve now got 5 processes auto started. But I when I query the
MiddleMan for their keys (in script/console), it doesn''t find them.
Looking at the start script, it looks like it might be creating a new
MiddleMan object for each autostart
BackgrounDRb::MiddleMan.new.new_worker(:class => entry[''class''],
Even changing it to
2008 Sep 24
1
Clearing cached results
I''m trying to figure out how to clear the for a worker from my
controller.
In my aysnc_xxx process I set cache[key]. However, I don''t see an easy
way to clear the cache from a controller with invoking something on
the worker.
What I was looking for was something like
MiddleMan(:worker_name, :worker_key_name).cache[key]=
Is there something like that and I''m just
2006 Aug 01
4
Creating workers from workers?
Since MiddleMan is an uninitialized constant in a worker how do you
create new workers inside a worker?
Thank You,
Ben Johnson
E: bjohnson at contuitive.com
O: 800-341-6826
M: 817-229-4258
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060731/75a77fa6/attachment-0001.html
2006 Dec 27
0
MiddleMan and RSpec partial mocks
I''m trying to test with RSpec (0.7.5), and I have the following code:
MiddleMan.should_receive(:new_worker)
Every time I run this code, I get this error:
undefined method `new_worker'' for class `DRb::DRbObject''
How do I get around this?
2007 Jan 30
1
Backgroundrb weirdness with multiple mongrels
Hi list,
I''m having some issues getting backgroundrb to play nice with more than
one mongrel. When I run my app on a single mongrel instance it works
fine.
I have two different problems show up in my backgrounrb_server.log. The
top of the backtrace is shown here:
20070130-12:03:03 (92473) failed to find slave socket - (RuntimeError)
20070130-12:03:03 (92473)
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 Jun 15
5
Cannot invoke ActiveRecord subclass accessors in DRb worker
Hi there,
I''m trying to create a worker to do some asynchronous web client work
and update the data model with its results. It seems, however, that
every call I make to an ActiveRecord subclass causes the whole thing
to block. At least I think it''s blocked. Right now I''m just using
debug log output.
Is there a decent way to debug/test workers I can try?
Is there any
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 <
2008 Jan 17
3
periodic scheduling
I''ve been using backgroundrb since back in March 2007 or so. It''s
been working mostly OK for me, but since the old version doesn''t seem
to work out of the box with rails 2.0 for me, I decided to test out
the latest version.
So, I''m looking at the scheduling, and trying to figure out the best
option for what I want to do. What I have is a set of workers that