Displaying 20 results from an estimated 200 matches similar to: "uninitialized constant BackgrounDRb::MetaWorker (NameError)"
2010 Dec 07
0
Is this error related to connection pool
Hi
My environment is
ruby 1.8.6
rails 2.2.2
mysql 5.1
windowsXP
I have a very lengthy controller action which fetch mail from pop
server.
But some times I get error. Mainly three error. And I have to restart
the application again to remove this errors. But after some time the
same errors again happens
1) Mysql::Error (Can''t connect to MySQL server on
2008 Jan 13
3
right usage of bdrb
Hi,
i''m going to implement a syndication-service, which will get lists in
xml with some meta-data an enclosed video files, which will get encoded
at the end. The syndication run will be startet every five minutes of
a full hour.
So i thought to build 4 Worker. One for checking which feeds to
syndicate (syndication_worker) at a specific time, one for processing
the list
2008 Jun 04
0
Large requests break BackgrounDRb
Hello, I think I may have discovered a bug in BackgrounDRb. It seems that
when the data being requested is large (via send_request), say in the range of
64k+, it crashes or at least incapacitates BackgrounDRb.
For example, take these two workers:
class SmallWorker < BackgrounDRb::MetaWorker
set_worker_name :small_worker
set_no_auto_load(true)
attr_reader :payload
def create(args)
2008 Jun 27
2
Tests failing when using ''reload_on_schedule true''
Hi All,
When I add the line ''reload_on_schedule true'' to my worker, my tests
will no longer run with the following exception:
Starting ferret DRb
server.../Users/revelation/projects/revelation-project/config/../lib/workers/alert_worker.rb:3:
undefined method `reload_on_schedule'' for AlertWorker:Class
(NoMethodError)
class AlertWorker < BackgrounDRb::MetaWorker
2008 Jun 04
2
Handling exceptions
Is there a convention for handling exceptions within BackgrounDRb workers?
For example, I have a worker which does some asynchronous data processing
(*not* a scheduled worker) based on some things in the database. However,
if an exception is raised within that worker, then the process for that
worker is killed off. Ideally I would want that worker to just silently
fail and be optimistic that it
2007 Dec 20
1
mocking a few things in the test helper
When using the provided bdrb_test_helper, I was getting some undefined
methods (register_status, thread_pool, etc) in unit tests. The README
says to go ahead and stub out methods that need it, and send the patch
to the list, so here it is (attached). Also, the MetaWorker initialize
method was written as "initializes", causing the @logger never to be
set, causing undefined method errors
2008 Jan 22
1
Newbie question on Scheduling
I''ve scheduled cron jobs etc before, but I''m curious as to how to layout a
worker properly. Here''s a basic example of what one of my workers looks
like:
class FooWorker < BackgrounDRb::MetaWorker
set_worker_name :foo_worker
def create(args = nil)
logger.info("Starting test: #{Time.now.strftime("%T")}")
run_test
logger.info("Finished test:
2008 May 03
2
backgroundrb / actionmailer / sendmail
Hello,
I''m trying to send emails from a backgroundrb worker and the email doesn''t
send. I get no log messages in the sendmail log or the system log, nothing
in the backgroundrb logs at all, nothing in the production log.
Below is my code for each component
worker:
class QuizReviewerWorker < BackgrounDRb::MetaWorker
set_worker_name :quiz_review_sender
def create(args =
2008 Jan 28
4
Scheduling same worker/method at different times with different args
I need to run the same worker''s method twice per day with different
arguments. Unfortunately, only the second entry in the schedule is firing.
I created an experimental worker to verify this:
Worker:
class ExperimentWorker < BackgrounDRb::MetaWorker
set_worker_name :experiment_worker
def create(args = nil)
# this method is called, when worker is loaded for the first time
2008 Mar 19
2
problem with worker status
Hi,
I have a page were users can start jobs that may take several hours to
run. BackgrounDrb is perfect for me and seems to be working well most of
the time but some times I have the following problem:
My worker is set up like this:
class UploadWorker < BackgrounDRb::MetaWorker
set_worker_name :upload_worker
set_no_auto_load(true)
def create(args = nil )
file = args[:file]
2008 Jan 03
1
Thread_pool bug?
I have a previous question regarding long tasks and the thread_pool (sorry
for the dup, I didn''t see the first go through). To try and track things
down, I made a change based on a suggestion found in the archives. I moved
my import contacts worker to its own file and set the pool_size to 1.
class ImportContactsWorker < BackgrounDRb::MetaWorker
set_worker_name
2008 Jan 17
2
Inconsistent Model creation behavior
Hi,
I have a relatively simple Worker: (I added the line numbers to the
email, they are not in the worker)
#####################################################################################
class ImagetestWorker < BackgrounDRb::MetaWorker
set_worker_name :imagetest_worker
def create(args = nil)
end
def save_image(args)
@newbook = Book.new
@newbook.comment =
2008 May 21
2
Schedule write errors?
My BackgrounDRb server intermittently bails out with the following exception
in the middle of a long running task running on a Worker sub classed
from BackgrounDRb::MetaWorker (the point at which it raises this exception
is different each time it runs)
/opt/local/lib/ruby/gems/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:145:in
`schedule_write'': You have a nil object when you
2008 Apr 04
5
First call to worker method doesn''t work
I have a worker as follows:
class SampleWorker < BackgrounDRb::MetaWorker
set_worker_name :sample_worker
def create(args = nil)
# this method is called, when worker is loaded for the first time
end
def my_method
# Deliver test e-mail message
Notifications.deliver_message(1, "DM")
end
end
I have a rails controller that calls the following code:
worker =
2008 Mar 25
1
extending bdrb / running multiple servers
Hi,
Thanks for the help getting the new backgroundrb working, things are
working fabulously now.
I have two questions:
1) I have a few basic methods I need available on all my workers in
order to communicate properly with my application... it seems to make
the most sense right now to subclass BackgrounDRb::MetaWorker, or make
a mixin module, because I''m actually extending some
2007 Nov 02
10
pre-release version of backgroundrb available now from svn
Hi,
A pre-release version of backgroundrb is available now from svn.
Download it from here:
http://svn.devjavu.com/backgroundrb/branches/version099/
Since this release marks significant migration from existing
practices, i intend to keep trunk untouched for a while.
There are no install scripts, but you should copy "backgroundrb" file
from script directory of plugin to script
2007 Dec 13
1
Possible Bug & Question
Hi there,
Amazing changes! I really like what you''ve done with BackgrounDRb and I hope
you continue developing it, since it was definitely somewhat languishing
before.
One small error stuck out for me, though. The create method requires an
argument even if one isn''t used, such that if you have:
def create
@results = Hash.new
end
The server throws an error about trying to
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
2008 Apr 08
0
cron trigger problem
Hi,
I am playing around with backgroundrb 1.0.3. I have the following
backgroundrb.yml,
---
:backgroundrb:
:port: 11006
:ip: 0.0.0.0
:schedules:
:task_worker:
:run:
:trigger_args: */10 * * * * *
My task worker is just,
class TaskWorker < BackgrounDRb:MetaWorker
set_worker_name :task_worker
def run
logger.info "begin"
sleep 60
logger.info
2008 Apr 09
1
Need help in passing parameters to a background job method
<backgroundrb-devel at rubyforge.org>I am trying to send email as a background
process from within a Rails app.
The goal is that when I go to http://mysite.com/foo/bar, the background job
kicks in and sends an email out. The relevant code snippets are below.
This errors out with a wrong number of arguments passed (2 for 1) message. I
think I am making a mess of passing parameters to the