MyCPAN::Indexer::Dispatcher::Parallel - Pass out work to sub-processes
Use this in backpan_indexer.pl by specifying it as the queue class:
backpan_indexer.pl
# in backpan_indexer.config dispatch_class MyCPAN::Indexer::Dispatcher::Parallel
This class takes the list of distributions to process and passes them out to the code that will do the work.
This is a dispatcher type
Takes the $Notes hash and adds the dispatcher key with a code reference. This module uses Parallel::ForkManager to run jobs in parallel, and looks at the
$Notes
dispatcher
Parallel::ForkManager
It also sets up keys for PID, whose value is an anonymous array of process IDs. That array matches up with the one in the key recent which keeps track of the distributions it's processing. It adds:
recent
dispatcher => sub { ... }, PID => [], recent => [],
MyCPAN::Indexer, MyCPAN::Indexer::Tutorial
This code is in Github:
git://github.com/briandfoy/mycpan-indexer.git
brian d foy, <bdfoy@cpan.org>
<bdfoy@cpan.org>
Copyright © 2008-2018, brian d foy <bdfoy@cpan.org>. All rights reserved.
You may redistribute this under the terms of the Artistic License 2.0.
To install MyCPAN::Indexer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MyCPAN::Indexer
CPAN shell
perl -MCPAN -e shell install MyCPAN::Indexer
For more information on module installation, please visit the detailed CPAN module installation guide.