Cédric
2008-Aug-19 08:38 UTC
[Backgroundrb-devel] Managing with multiple worker and processor load
I wonder how to manage with multiple workers and processor''s charges. Here''s the case : There are two processes. The first is scanning web pages in order to find some flash movies. If found, the process scan also for title, tags, and so on. This process is called "crawler" and is running permanently. In my model, the method "after_create" is calling another worker, which receive some URL(s). The worker imports the given JPG image, crops it, and saves it localy. Thus, things could happen like this : the crawler is scanning a lot of web pages, importing a lot of flash movies, which are starting the second worker for something like 30 pictures to crop... each... And my computer is lacking. In the docs, i read something about queuing job, but i must confess i didn''t understand everything. Any help would be appreciate. Code : [1] videothumbnailer_worker : http://pastie.org/255529 -- Bousmanne C?dric Jabber / XMPP : akyrho at gmail.com Mail : akyrho at gmail.com Blog : http://www.parenthese.be/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080819/780d856e/attachment.html>