Displaying 20 results from an estimated 80000 matches similar to: "File processing implementation question"
2006 Sep 01
8
Worker suicide
Hi the list people, hi Ezra,
I just read from this message
http://rubyforge.org/pipermail/backgroundrb-devel/2006-July/000134.html that
BackgrounDRb will offer a way to kill a worker from within itself.
As this message is from 7/25, I wonder if this feature has been added since.
If not, is there any way to do it? I tried this:
MiddleMan.delete_worker(@_job_key)
But it raise:
uninitialized
2007 Dec 22
2
Implementation details for worker Queue
Hi All,
One can easily code a backgroundrb worker so as it can act as a worker
queue, having reached a stable status, perhaps its time we should add
this feature.
Why?
Because if you are already running your application using
BackgrounDRb, perhaps you don''t want to manage other solutions when
capability to do that is right there with you.
Interface?
This where i need feedback. You can
2006 Jun 16
2
Need to call C++ processing beast from backgroudrb
Hello,
Bravo Ezra for Backgroundrb! What an elegant piece of engineering. I
envision many folks like myself looking at our CPU hogging executables and
finally seeing a clean path to the Web.
I was wondering if any folks have a good strategy for calling out to a C++
(or any other compiled) executable from a worker. Is the only option to call
system() from a worker? That feels a bit unsatisfying.
2006 Jul 31
0
MY worker won''t stop working
> On Jul 30, 2006, at 5:11 PM, Chris H wrote:
>
>> Hi Ezra,
>>
>> thanks for the reply.
>>
>> There''s a ruby process that appears in top when I fire off the do_work
>> method.
>> It uses around 30-50% cpu and disappears once all processing has
>> completed.
>>
>> When I try to stop processing using delete_worker I was
2007 Jan 15
2
Backgroundrb keeps spawning processes
Hi!
I''ve just a created a really simple rails scheduled worker for
backgroundrb to start playing with :
class SessionCleanerWorker < BackgrounDRb::Worker::RailsBase
def do_work(args)
logger.info "SessionCleaner> started"
CGI::Session::ActiveRecordStore::Session.destroy_all( [''updated_at
<?'', 120.minutes.ago] )
2006 Jul 19
1
A couple of problems
Hi Ezra,
Thanks for the great work on BackgrounDRb. I have come across a
couple of problems.
1. I wanted to define a simple class in the worker file to wrap up and
pass back some data to my controller. It seems that if I create the
class either inside or outside of my worker class (in the same file)
it gets wrapper by a DRb::DRbUknown object and therefore cannot be
accessed from my controller.
2006 Oct 30
1
new BackgroundRB
Hey Greg-
Yes I am sorry, the new architecture uses fork and named pipes and a
bunch of unix stuff to do its magick. Now you may be able to port it
to qwork on windows, but I don''t think it is possible :( I''m really
sorry about this but I need this thing to be as robust and solid as
it can be and in the end windows isn''t compatible. Now you may be
able to
2007 Nov 21
2
Is fork { } safe inside of a worker? How else may this be done...
I have a BackgrounDRb worker running every 2 minutes. Here''s the basic idea:
- events = Event.find_all_pending( 2.minutes )
- while( all events have yet to be processed )
---- if( Time.now <= event.time_to_process )
------- fork { process_event }
--- end
--- sleep( 0.25 )
- end
- puts "Done..."
Events that need to be processed within the next 2 minutes are loaded and
2007 Dec 28
2
Arity?
Hello,
First off, nice improvements hemant! Thanks for all the hard work. I
just whipped up a new worker for a scheduled job that sends digest
emails. Very smooth.
However, moving some of my old backgroundrb into new backgroundrb
isn''t going quite as smoothly. I have a import worker that takes a
number of parameters and then is started dynamically. Here''s the a
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 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
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,
2008 May 20
1
Couple questions on BDRb and concurrent processing
My Rails site uses BackgroundDRb and I have a couple of questions:
1. Can someone point me to some sample code/examples for how to use
thread_pool? The website doc says to add a line
======
pool_size 10
======
in my Worker class which seems straightforward.
I wasn''t able to understand this part though:
=========
thread_pool.defer(wiki_scrap_url) { |wiki_url| scrap_wikipedia(wiki_url) }
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 Apr 06
2
Best way to start a worker
I have installed backgroundrb. I can start it. I have read everything I
can get my hands on, and have read the list for a few months. I have
written a worker, and am ready to start.
This worker reads a queue, and processes it (sends queued emails). Sends 10,
sleeps for a minute, sends 10 until done - very straightforward.
My question is, what would be the best way to run this? I have
2007 Mar 08
0
worker cant delete?
Hi,
I get the following error from my client program when I try to call delete
after my worker is completed:
goten at goten-server:~/projects/svn_working/m29svn_back/app$ ruby
backup_app.rb {:done=>true, :txt=>["piping to tmp", "piping done",
"getting youngest", "youngest got", "destfile
2006 Jul 18
0
Two backgroundrb questions
On Jul 18, 2006, at 6:24 AM, Matt Mower wrote:
> Hi Ezra,
>
> I''m converting some code I have which basically ran Enumerable#map
> asynchronously using a thread-per-value to use backgroundrb
> (recommended by zedas). That code works but I have a scaling problem
> and needed to introduce throttling.
>
> However now that I''ve looked at it I don''t
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 31
0
background worker just stops running after some time
Hi,
I am fairly new to ruby/rails, but I thought I did a fair job of setting up
my background worker, but after some time, maybe 4-5 hours of running, it
just stops running, without any messages. Here is the yml file:
backgroundrb.yml
---
:port: 2000
:rails_env: production
:host: localhost
here is my schedules file:
alerts_task:
:class: :alerts_worker
:job_key: :alerts_key
2008 May 23
0
Backgroundrb-devel Digest, Vol 24, Issue 7
Hi, all. Just wondering if anyone has tried using the Paperclip file
upload plugin with Backgroundrb. My current implementation uses
attachment_fu - I save the file initially to the file system without
generating thumbs, then a bdrb process picks up that file, generates
thumbs, and saves to S3. This works fine and dandy, the only hitch is
I want to save image metadata in the same table