Atsushi Kobayashi > Jonk-0.05 > Jonk

Download:
Jonk-0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

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

NAME ^

Jonk - simple job tank manager.

SYNOPSIS ^

    use DBI; 
    my $dbh = DBI->connect(...);
    # enqueue job
    {
        use Jonk::Client;
        my $jonk = Jonk::Client->new($dbh);
        $jonk->enqueue('MyWorker', 'arg');
    }

    # dequeue job
    {
        use Jonk::Worker;
        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 ^

  git clone git://github.com/nekokak/p5-Jonk.git

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.

syntax highlighting: