GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  JONK::CLIENT (3)

.ds Aq ’

NAME

Jonk::Client - job enqueue client class.

CONTENTS

SYNOPSIS



    use DBI;
    use Jonk::Client;
    use DateTime;
   
    my $dbh = DBI->connect(...);
    my $jonk = Jonk::Client->new($dbh,
        {
            table_name => jonk_job,
            enqueue_time_callback => sub {
                DateTime->now->strftime(%Y-%m-%d %H:%M:%S);
            },
        }
    );



METHODS

my CW$jonk = Jonk::Client->new($dbh, CW$options);

Creates a new Jonk object, and returns the object.

$option is an optional settings.
o $dbh

$dbh is database handle.

o $options->{table_name}

specific job table name.

Default job table name is ‘job‘.

o $options->{enqueue_time_callback}

specific enqueue_time creation callback.

Default local time create.

my CW$job_id = CW$jonk->enqueue($func, CW$arg);

enqueue a job to a database. returns job.id.
o $func

specific your worker funcname.

o $arg

job argument data.

serialize is not done in Jonk.

Please pass data that does serialize if it is necessary.

my CW$errstr = CW$jonk->errstr;

get most recent error infomation.

ERROR HANDLING



  my $job_id = $jonk->enqueue(func,arg);
  if ($jonk->errstr) {
      die $jonk->errstr;
  }



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 JONK::CLIENT (3) 2010-11-26

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.