Displaying 20 results from an estimated 6000 matches similar to: "MiddleMan and RSpec partial mocks"
2007 Jan 27
0
Debugging stale backgroundrb
Hi!
As you might remember I''m having a problem of backgroundrb stopping
calling my workers after some period of time. I tried adding logging
to backgroundrb source code but it didn''t help. So, after digging
through internet I''ve found several gdb tools and here''s what I''ve
discovered:
After attaching to a backgroundrb ruby process it turns out that it
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 Sep 05
2
question about passing array of AR objects to worker
got a wierd problem maybe someone can help with.
whenever i try to pass an array or AR objects to my worker, i end up
with a DRb object in the worker...here''s an example
class SearchWorker < BackgrounDRb::Rails
attr_reader :resources
def do_work(resources)
logger.info resources.inspect
end
end
class SearchController < ApplicationController
def start_search
2006 Nov 04
1
BackgrounDRb Call for help
Hey there bdrb''ers!
I have been so very busy with http://engineyard.com that I have not
had time to complete the new release of backgroundrb. But I have done
substantial work towards it. It is basically an entirely new beast
with a complete rethinking of how it works. I have put up a zip file
of the new code base in the hopes that some folks will be able to
start playing with
2007 Oct 25
3
Mocking Workers in Backgroundrb
Hi
Has anyone mocked a call like the following for backgroundrb?
MiddleMan.new_worker(:class => :admin_email_worker, :args => params
[:email])
I cannot seem to find the correct manner to do it.
Would have liked to be able to do MiddleMan.should_receive
(:new_worker).with(:class => :admin_email_worker, :args => {"body" =>
"my message"})
Cheers
Shane
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)
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 Dec 01
0
Worker won''t start work
(Sorry my last email had the wrong subject)
Hi,
I''ve just installed background rb 0.2.1.
When I try start a worker in my application controller I receive the
following error:
wrong number of arguments (2 for 1) - (ArgumentError)
/home/chris/projects/call_manager/trunk/call_manager_app/vendor/plugins/backgroundrb/server/lib/backgroundrb/middleman.rb:211:in
`initialize''
2007 Jan 23
0
Error while creating one worker from another
for some strange reason this error occours when i create one worker from
another BUT only when i derive worker class from Worker::Base instead or
Worker::RailsBase - when change it back it works fine, child worker can
have empty do_work, but this error still ocours
Bad file descriptor (Errno::EBADF)
/var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:214:in `for_fd''
2007 Apr 27
0
Backgroundrb running under cygwin - having issue with Railsbase workers
Hello all,
We''re currently running version .1.x in our environment. We would like to
move to .2.x to take advantage of some of the improvements made running in a
multi-process environment. We deploy to a linux environment but develop
locally in Windows. I''m aware that a number of people have reported the
ability to run .2.x of backgroundrb inside cygwin, and for the most part,
2007 Apr 09
1
Drb Connection error on multiple dispatch.fcgi ''s
Hi All,
I''m using Backgroundrb as a general purpose long-running-task back-end
(upload processing, email sending, etc), and it''s been a great solution.
However I''ve recently run into some some intermittent connection issues
that have me baffled. I''m running on apache2/fcgid and the problem
occurs in both devlopment and production mode. The problem seems to
2007 May 09
0
Neophyte needs help!
Hi All,
Real neophyte here, to both backgroundrb and ruby/rails in general.
(Hey, we''ve all got to start somewhere, right!) :)
I''ve just been playing around with the example code at
http://backgroundrb.rubyforge.org/ , and trying to get all
the pieces to work (btw, I''m using version 0.2.1).
I did a ''generate worker example'', which created an
2007 Oct 12
0
Trouble on Multi Server setup
Hello all,
I''m having some trouble getting backgroundrb set up so that all the
processing happens on a single machine. I have 3 load balanced
machines. Right now, all three run our web application and create
MiddleMan workers to generate a large PDF report.
However, because of the processing power needed to generate the PDFs,
I want to change our setup so that two servers run
2007 Nov 12
0
Workers calling Workers
Hello,
We are working on a centralized report generating project, which calls
for data processing on different servers and then centralizes the
reports into a single project. What we would like to do is have a
Monitor BackgrounDRb worker call another BackgrounDRb worker to process
data on a different server, and then have our Monitor Worker collect the
data and then store it according to our
2007 Aug 08
3
Cannot start workers in production mode
I have a job that I am starting from a Rails controller in production mode
using MiddleMan:
MiddleMan.new_worker(:class => :import_ccg_category_worker, :args => {
:category_id => @category.id, :remote_category_id =>
params[:remote_category_id], :description => "Importing CCG products for #{@
category.name}" })
Both of the category ID variables are just basic integers. I
2006 Jul 19
1
Testing worker classes
Hi,
Does it make sense to test a worker class by calling
Middleman.new_worker? Or should I just be testing the functionality in
the do_work method, with, say, a mock object. This seems like a really
ugly DRY violation: you''d need to keep the code in the mock and the
real worker in sync.
That''s the philosophical half of my question. In fact, until someone
tells me why I
2007 May 22
0
BackgroundRb Server not responding
Hey,
I have scheduled script that is not working very well. It will only run
once or twice before I have to restart the server to get it running again.
If I try to the worker manually after it has stopped exceuting the schedule
I get this in the server log:
20070522-07:33:36 (5030) Connection reset by peer - (DRb::DRbConnError)
20070522-07:33:36 (5030) /usr/local/lib/ruby/1.8/drb/drb.rb:566:in
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,
2007 Jul 29
4
Server dying with perpetual "Connection reset by peer"
I''m at a loss to explain a very strange error I''m getting.
This seems to happen on our production system where we have a
backgroundrb server sharing a host with a Rails app running on
Mongrel. The first one or two, occasionally three, calls to a worker
(direct MiddleMan calls from Rails, not scheduled) succeed, but
afterwards, the server fails to initialize new workers.
2007 Feb 28
0
IOError problem
Hello -
Can anyone explain why I get the stack trace in background_server.log when
I try to start my first worker? I don''t get this on subsequent workers,
only the first one.
I should note, the method I am using to start backgroundrb is documented
in the archives, and is likely the root of this problem. Suggestions about
how to "fix" or avoid this issue are appreciated.