Displaying 20 results from an estimated 500 matches similar to: "Can :args only be a string?"
2006 Mar 29
1
Using boolean terms in PHP bindings
OK, I'm indexing my data with the scriptindex. I want to be able to
restrict the search by the category field. Do I need to do anything to
the data itself? Like, literally prefix it with the characters "XC"?
Below is my indexor for scriptindex and the my php code...
document_id : field=ref unique=Q boolean=Q
search_id : field=document_id index=S
document_title : field=title
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
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 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
2006 Aug 23
5
Singleton-like Worker
Hello there,
I need a Worker Class to be Singleton-like, that means there must be at
maximum one Instance at a time. When a new Request is made to create another
worker of this type, it should return and wait for the other instance to be
destroyed.
what i need to do: i have a worker who needs to do sth with java and
openoffice, and it seems when i have more tha one worker simultaneously,
2007 Dec 17
7
Get "some read error" on calls to worker
I''m running the latest from svn (rev 285). I''ve been having a problem
launching a process repeatedly. What happens is that I get a debug
message "some read error" and then the worker refuses to run again.
I''ve stripped my worker down to just doing a puts and it still happens.
Like the other threads I want to launch my workers as needed, however I
get the
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
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
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 <
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)
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
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
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`.
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 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
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 22
1
failed to find slave socket - (RuntimeError)
Hi everyone,
I''ve a class that try to spawn two workers, every 5 seconds.
The code is something like:
while true do
MiddleMan.new_worker(:class => :researches_worker,:job_key
=> :researches)
MiddleMan.new_worker(:class => :products_worker,:job_key => :products)
sleep(5)
end
I''m using ":job_key", so if a worker hasn''t already ended its work
2007 Jun 20
2
send objet between 2 workers
Hi,
I''m using backgroundrb but I have 2 problems with it.
First is when I launch a thread Toto from the do_work method. Toto can''t
access to a class variable defined before... (undefined method `+'' for
nil:NilClass)
I suspect that thread is launched when backgroundrb start but the worker not
..
My code is :
class MonWorker < BackgrounDRb::Worker::RailsBase
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
2007 Mar 02
1
example standalone error.
Hello,
Trying to get the example to work in standalone mode. I have the following
in a file and am not certain why I get this undefined method error:
error:
~/ruby sample_app.rb
my sample app :)
sample_app.rb:9: undefined method `new_worker'' for
BackgrounDRb::MiddleMan:Class (NoMethodError)
### code follows ###
# sample_app ... try to get stand-alone happiness.
#require