Displaying 20 results from an estimated 900 matches similar to: "Job Queue"
2008 Jan 29
5
Authoritative Documentation
I''ve been using backgroundrb for... about an hour now. I must say, I''m
impressed.
But I''m a bit stumped on where to find the "official" documentation.
There''s an API online at backgroundrb.rubyforge.org, but I don''t see
the methods available for MiddleMan, etc.
Right now, I''m trying to figure out how to get a list of all
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
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 03
1
Memory leak and long process problem
I use backgroundrb for many long tasks in my system, but I''m having issues
with one in particular. Two large tasks for me are importing people and
updating companies.
def import_contacts(args = nil)
thread_pool.defer(args) do |job_id|
begin
job = ImportJob.find(job_id)
job.process_job
rescue => err
logger.error "MscWorker#import_contacts
2008 May 30
5
Upper limit to number of jobs queued by BDRb?
I use BDRb to process RSS feeds for users on my site (http://feedflix.com).
I have a batch job that queries the DB for records that haven''t been updated
in the last so many hours and kicks off a background job for each of them.
If N records are returned by the DB, N background jobs gets queued and get
done serially. As long as N is 255 or under, everything works like a charm.
2008 Apr 12
2
Sequence of multiple background process submissions
I have a question on how multiple b/g processes that are kicked off get
handled in terms of sequence/schedule.
On my site, a user enters an RSS feed to be processed and since this takes
about 5-10 secs, I pass the process off to a background job and meanwhile do
some Ajaxy spinners and tap-dancing until the job completes and then
redirect_to the appropriate page. This works great.
I also need to
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
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
2007 Dec 21
7
Using my models
I''m working on upgrading my app to the latest version of backgroundrb.
Everything went find until I tried to execute my tasks.
Here is my simple worker for testing:
class MscWorker < BackgrounDRb::MetaWorker
set_worker_name :msc_worker
def create(args = nil)
# this method is called, when worker is loaded for the first time
end
# Send a message to everyone
def
2008 May 09
1
register_status for excess thread_pool?
Hi,
Newbie here. I''ve got a worker (for generating PDF reports) that
uses the "thread_pool" to allow processing multiple reports
simultaneously and queue up any requests that exceed the thread
pool (pool_size = 10 currently).
def process_pdf(user)
thread_pool.defer(user) do |user|
makepdf(user)
end
end
My question is: I use a mutex to handle
2008 Jun 10
4
adding results from threads to a collection and returning it
Forgive me if this has been addressed somewhere, but I have searched and
can''t come up with anything.
I am basically trying to distribute several web page scraping tasks among
different threads, and have the results from each added to an Array which is
ultimately returned by the backgroundrb worker. Here is an example of what
I''m trying to do in a worker method:
pages =
2006 Aug 24
3
A new QueueWorker class
Hello all,
I''ve come up w/ a worker class that manages queued jobs using a fixed
number of child workers. Well, that''s not quite true -- a new worker is
spawned for each job, but you set the total number that may exist at once.
There are three components:
1) queue_worker.rb: The singleton worker that manages the child workers.
You probably want to auto start this. Make sure you
2008 Mar 09
13
Using the ip flag
Hey All,
I am looking for an example of the proper config settings for background rb to run my rails app and my backgroundrb instance on separate machines (or more precisely, to have a rails cluster with one backgroundrb machine). Does anyone have such examples?
Thanks!
-Noah
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
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
2007 Dec 25
6
error: no marshal_dump is defined for class Thread
I get this error periodically in backgroundrb.log, but only on my
production box (the one running ruby 1.8.5) - my dev box doesn''t get
this error. As far as I can tell, everything is working ok, despite
the error (I don''t really know how to determine if the jobs are
getting threaded successfully, but they are running, that I am sure
of).
Here''s the dump:
no
2007 Dec 24
2
backgroundrb script crashing on startup
Everything works fine on my development box (Ubuntu 7.10, Ruby 1.8.6)
but on my server (Fedora Core 6, Ruby 1.8.5) when I run
script/backgroundrb start, the process fails to start.
This is with Rails 2.0.2 frozen in the app, and I have the most recent
version of the plugin (r297). Is Ruby 1.8.6 a requirement for
backgroundrb now? I can''t figure any other reason it would fail...
2004 Jul 27
6
Successfully Using $135 Avaya sip phone
I think I am the first to use the $135 Avaya 4602 SIP phone, but I
need some support from the community to fix one problem I have with
it.
The phone stops working after about 20-30mins if I have
mailbox=context in Asterisk; when I do have mailbox=contect in
asterisk the sip debug returns "481 extension does not exist."
Anyone willing to help me figure out why?
I.E. Is it an Asterisk
2006 May 03
6
New Release: One-Click Ruby Installer 1.8.4-17 release candidate 2
We are almost there to a final release. The uninstall issues have been
fixed, and a few packages have been upgraded to more recent versions. Many
thanks to Ryan Leavengood and Shahank Date who stepped in to help finish off
this release!
*** Only "show-stopper" problems will be fixed ***
We are extreme short of manpower at the moment. So as much as I would like
to address each and every
2008 Mar 18
1
Polling is REALLY slow
I''m having some trouble with using brb for polling for work. Basically, what
I want to do is update the state of a record and have brb notice and start a
process. I do not want to call ask_work for each process because there may
be several places where the object''s state is changed, and I only want to
process once. Plus, I can schedule things better this way. My first
thought
2008 Feb 03
1
Defer multiple methods within the same worker to the thread pool?
Within a threaded worker, I would like to have multiple methods. Will
the following code work?
def method_1(args)
thread_pool.defer(args) do |args|
#work
end
end
def method_2(args)
thread_pool.defer(args) do |args|
#work
end
end
. . . or, should I have one "meta"-method and pass which sub-method
to perform via args?
def meta_method(args)