Displaying 10 results from an estimated 10 matches for "example_worker".
2008 Dec 31
3
Paste in a FOR loop
Hi All,
I've been having a little trouble using R2HTML and a loop, but can't figure
out where the problem lies, any hints gratefully received.
My code at the minute, (Which does work) is in the following:
library(R2HTML)
HTMLStart(outdir =
file.path("C://Example_work","R_projects","Dynamic_creative"),filename =
"RMDC_mockup",Title="Mock up for
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
2007 Mar 02
1
example standalone error.
...elease-0.2.1/lib/backgroundrb''
#MiddleManDRbObject.init(:uri
=>''drbunix:///tmp/backgroundrbunix_localhost_2000'')
require ''backgroundrb/middleman''
include BackgrounDRb
puts ''my sample app :)''
key = MiddleMan.new_worker(:class => :example_worker)
worker = MiddleMan.worker(key)
worker.other_method
worker.delete
# now that my job is done (and my worker is actually deleted on the server)
view
# my results ... cause now I''lm interested.
p worker.results.to_hash
puts ''bye bye :)''
I kinda confused because most of the...
2007 May 26
0
New worker not being created
...'other_method in ExampleWorker called'')
> results[:extra_data] = "Just a plain old string"
> end
>
> end
> ExampleWorker.register
>
> Then in a controller, I have:
>
> def test_backgroundrb
> key = MiddleMan.new_worker(:class => :example_worker)
> worker = MiddleMan.worker(key)
> worker.other_method
> worker.delete
> end
>
> When I point the browser to test_backgroundrb, I get:
>
> NoMethodError (undefined method `object'' for nil:NilClass):
> (drbunix:///tmp/backgroundrbunix_localhost_...
2007 May 09
0
Neophyte needs help!
...;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 example_worker.rb
file in my ./libs/workers directory.
I fleshed it out so it looks like this (as per the example in the
documentation):
#####################################################################
class ExampleWorker < BackgrounDRb::Worker::RailsBase
def do_work(args)
logger.info(''E...
2006 Nov 05
5
backgroundrb preview
Hi Ezra/skaar,
Wow man, the exercise was worth it. The connection closed problem with
socket as i mentioned in my earlier mails...completely disappeared,
and now i can connect only once to the socket and keep reading..till
end of its days.
Literally impossible with older release of backgroundrb.
This could also potentially solve the issues people were having with
ActiveRecord.
As i said
2007 Mar 02
0
example standalone error ... but if i ...
...;'
from ./backgroundrb/middleman.rb:461:in `gen_key''
from ./backgroundrb/middleman.rb:173:in `new_worker''
from ./backgroundrb/middleman.rb:173:in `new_worker''
from sample_app.rb:9
code:
key = MiddleMan.instance.new_worker(:class => :example_worker)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20070301/e16d927f/attachment.html
2006 Oct 30
11
BackgrounDRb 0.2.0 Release! Complete rewrite.
...complex and use
full cron compatible syntax.
Workers can be scheduled by two built in ''trigger'' types. A simple
''trigger'' is specified with start, stop and interval:
require ''active_support''
MiddleMan.schedule_worker(
:class => :example_worker,
:job_key => :schedule_test,
:worker_method => :other_method,
:trigger_args => {
:start => Time.now + 5.seconds,
:end => Time.now + 10.minutes,
:repeat_interval => 30.seconds
}
The cron trigger uses a similar syntax to cron found on UNIX s...
2006 Oct 30
1
new BackgroundRB
...rkers can be scheduled by two built in ''trigger'' types. A simple
>
> ''trigger'' is specified with start, stop and interval:
>
>
>
> require ''active_support''
>
> MiddleMan.schedule_worker(
>
> :class => :example_worker,
>
> :job_key => :schedule_test,
>
> :worker_method => :other_method,
>
> :trigger_args => {
>
> :start => Time.now + 5.seconds,
>
> :end => Time.now + 10.minutes,
>
> :repeat_interval => 30.seconds
>
>...
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?