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::WORKER (3)

.ds Aq ’

NAME

Jonk::Worker - get a job data class.

CONTENTS

SYNOPSIS



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



METHODS

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

Creates a new Jonk object, and returns the object.

$options is an optional settings.
o $dbh

$dbh is database handle.

o $options->{functions}

Key word of job which this Jonk instance looks for.

o $options->{table_name}

specific job table name.

Default job table name is ‘job‘.

o $options->{job_find_size}

specific lookup job record size.

Default 50.

my CW$job_hash_ref = CW$jonk->dequeue($job_id);

dequeue a job from a database.

returns job hashref data.

Please do deserialize if it is necessary.
o $job_id (optional)

lookup specific $job_id’s job.

CW$jonk->errstr;

get most recent error infomation.

ERROR HANDLING



  my $job = $jonk->dequeue;
  if ($jonk->errstr) {
      die $jonk->errstr;
  }



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


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

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