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

.ds Aq ’

NAME

TheSchwartz::Simple - Lightweight TheSchwartz job dispatcher using plain DBI

CONTENTS

SYNOPSIS



  use DBI;
  use TheSchwartz::Simple;

  my $dbh = DBI->connect(...);
  my $client = TheSchwartz::Simple->new([ $dbh ]);
  $client->prefix("theschwartz_"); # optional
  my $job_id = $client->insert(funcname, $arg);

  my $job = TheSchwartz::Simple::Job->new;
  $job->funcname("WorkerName");
  $job->arg({ foo => "bar" });
  $job->uniqkey("uniqkey");
  $job->run_after( time + 60 );
  $client->insert($job);

  my @jobs = $client->list_jobs({ funcname => funcname });
  for my $job (@jobs) {
      print $job->jobid;
  }



DESCRIPTION

TheSchwartz::Simple is yet another interface to insert a new job into TheSchwartz database using plain DBI interface.

This module is solely created for the purpose of injecting a new job from web servers without loading additional TheSchwartz and Data::ObjectDriver modules onto your system. Your schwartz job worker processes will still need to be implemented using the full featured TheSchwartz::Worker module,

AUTHOR

Tatsuhiko Miyagawa <miyagawa@cpan.org>

COPYRIGHT

Six Apart, Ltd. 2008-

LICENSE

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

SEE ALSO

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


perl v5.20.3 THESCHWARTZ::SIMPLE (3) 2009-02-09

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