Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
TheSchwartz::Simple(3)User Contributed Perl DocumentatioTheSchwartz::Simple(3)

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

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

perl v5.32.1			  2009-02-09		TheSchwartz::Simple(3)

NAME | SYNOPSIS | DESCRIPTION | AUTHOR | COPYRIGHT | LICENSE | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=TheSchwartz::Simple&sektion=3&manpath=FreeBSD+13.1-RELEASE+and+Ports>

home | help