Atsushi Kobayashi > Jonk-0.05 > Jonk::Cookbook::DequeueSpecificJob

Download:
Jonk-0.05.tar.gz

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source   Latest Release: Jonk-0.10_02

NAME ^

Jonk::Cookbook::DequeueSpecificJob - dequeue specific job.

USAGE ^

    #! perl
    use strict;
    use warnings;
    use DBI;
    use Jonk::Client;
    use Jonk::Worker;
    
    my $dbh = DBI->connect('dbi:mysql:test','user','pass');
    
    my $client = Jonk::Client->new($dbh);
    my $job_id = $client->enqueue('worker_key','job_data_here');
    
    my $worker = Jonk::Worker->new($dbh => {functions => [qw/worker_key/]});
    my $job = $worker->dequeue($job_id);
syntax highlighting: