Forks::Queue::SQLite - SQLite-based implementation of Forks::Queue
0.15
my $q = Forks::Queue->new( impl => 'SQLite', db_file => "queue-file" ); $q->put( "job1" ); $q->put( { name => "job2", task => "do something", data => [42,19] } ); ... $q->end; for my $w (1 .. $num_workers) { if (fork() == 0) { my $task; while (defined($task = $q->get)) { ... perform task in child ... } exit; } }
SQLite-based implementation of Forks::Queue. It requires the sqlite3 libraries and the DBD::SQLite Perl module.
sqlite3
See Forks::Queue for an overview of the methods supported by this Forks::Queue implementation.
Forks::Queue
The Forks::Queue::SQLite constructor recognized the following configuration options.
Forks::Queue::SQLite
db_file
The name of the file to use to store queue data and metadata. If omitted, a temporary filename is chosen.
style
limit
on_limit
join
persist
See "new" in Forks::Queue for descriptions of these options.
Copyright (c) 2017-2019, Marty O'Brien.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
See http://dev.perl.org/licenses/ for more information.
To install Forks::Queue, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Forks::Queue
CPAN shell
perl -MCPAN -e shell install Forks::Queue
For more information on module installation, please visit the detailed CPAN module installation guide.