From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

NAME

Jonk - simple job tank manager.

SYNOPSIS

use DBI;
my $dbh = DBI->connect(...);
# enqueue job
{
my $jonk = Jonk::Client->new($dbh);
$jonk->enqueue('MyWorker', 'arg');
}
# dequeue job
{
my $jonk = Jonk::Worker->new($dbh, {functions => ['MyWorker']});
my $job = $jonk->dequeue;
print $job->{func}; # MyWorker
print $job->{arg}; # arg
}

DESCRIPTION

Jonk is simple job tanking system.

Job is saved and taken out. Besides, nothing is done.

You may use Jonk to make original Job Queuing System.

Jonk::Client

enqueue client class.

Jonk::Worker

dequeue client class.

SCHEMA

MySQL

CREATE TABLE job (
id int(10) unsigned NOT NULL auto_increment,
func varchar(255) NOT NULL,
arg MEDIUMBLOB,
enqueue_time DATETIME NOT NULL,
primary key ( id )
) ENGINE=InnoDB

SQLite

CREATE TABLE job (
id INTEGER PRIMARY KEY ,
func text,
arg text,
enqueue_time text
)

PostgreSQL

CREATE TABLE job (
id SERIAL PRIMARY KEY,
func TEXT NOT NULL,
arg BYTEA,
enqueue_time TIMESTAMP NOT NULL
)

SUPPORT

irc: #jonk@irc.perl.org

REPOSITORY

CONTRIBUTORS

tokuhirom

kan_fushihara

fujiwara

AUTHOR

Atsushi Kobayashi <nekokak _at_ gmail _dot_ com>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.