Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gearmand(1p) [debian man page]

GEARMAND(1p)						User Contributed Perl Documentation					      GEARMAND(1p)

NAME
gearmand - Gearman client/worker connector. SYNOPSIS
gearmand --daemon DESCRIPTION
This is the main executable for Gearman::Server. It provides command-line configuration of port numbers, pidfiles, and daemonization. OPTIONS
--daemonize / -d Make the daemon run in the background (good for init.d scripts, bad for running under daemontools/supervise). --port=7003 / -p 7003 Set the port number, defaults to 7003. --pidfile=/some/dir/gearmand.pid Write a pidfile when starting up --debug=1 Enable debugging (currently the only debug output is when a client or worker connects). --accept=10 Number of new connections to accept each time we see a listening socket ready. This doesn't usually need to be tuned by anyone, however in dire circumstances you may need to do it quickly. --wakeup=3 Number of workers to wake up per job inserted into the queue. Zero(0) is a perfectly acceptable answer, and can be used if you don't care much about job latency. This would bank on the base idea of a worker checking in with the server every so often. Negative One (-1) indicates that all sleeping workers should be woken up. All other negative numbers will cause the server to throw exception and not start. --wakeup-delay= Time interval before waking up more workers (the value specified by --wakeup) when jobs are still in the queue. Zero(0) means go as fast as possible, but not all at the same time. Similar to -1 on --wakeup, but is more cooperative in gearmand's multitasking model. Negative One (-1) means that this event won't happe, so only the initial workers will be woken up to handle jobs in the queue. COPYRIGHT
Copyright 2005-2007, Danga Interactive You are granted a license to use it under the same terms as Perl itself. WARRANTY
This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND. AUTHORS
Brad Fitzpatrick <brad@danga.com> Brad Whitaker <whitaker@danga.com> SEE ALSO
Gearman::Server Gearman::Client Gearman::Worker Gearman::Client::Async perl v5.10.1 2009-10-05 GEARMAND(1p)

Check Out this Related Man Page

TheSchwartz::Worker(3pm)				User Contributed Perl Documentation				  TheSchwartz::Worker(3pm)

NAME
TheSchwartz::Worker - superclass for defining task behavior SYNOPSIS
package MyWorker; use base qw( TheSchwartz::Worker ); sub work { my $class = shift; my TheSchwartz::Job $job = shift; print "Workin' hard or hardly workin'? Hyuk!! "; $job->completed(); } package main; my $client = TheSchwartz->new( databases => $DATABASE_INFO ); $client->can_do('MyWorker'); $client->work(); DESCRIPTION
TheSchwartz::Worker objects are the salt of the reliable job queuing earth. The behavior required to perform posted jobs are defined in subclasses of TheSchwartz::Worker. These subclasses are named for the ability required of a "TheSchwartz" client to do the job, so that the clients can dispatch automatically to the approprate worker routine. Because jobs can be performed by any machine running code for capable worker classes, "TheSchwartz::Worker"s are generally stateless. All mutable state is stored in the "TheSchwartz::Job" objects. This means all "TheSchwartz::Worker" methods are class methods, and "TheSchwartz::Worker" classes are generally never instantiated. SUBCLASSING
Define and customize how a job is performed by overriding these methods in your subclass: "$class->work( $job )" Performs the job that required ability $class. Override this method to define how to do the job you're defining. Note that will need to call "$job->completed()" or "$job->failed()" as appropriate to indicate success or failure. See TheSchwartz::Job. "$class->max_retries( $job )" Returns the number of times workers should attempt the given job. After this many tries, the job is marked as completed with errors (that is, a "TheSchwartz::ExitStatus" is recorded for it) and removed from the queue. By default, returns 0. "$class->retry_delay( $num_failures )" Returns the number of seconds after a failure workers should wait until reattempting a job that has already failed $num_failures times. By default, returns 0. "$class->keep_exit_status_for()" Returns the number of seconds to allow a "TheSchwartz::ExitStatus" record for a job performed by this worker class to exist. By default, returns 0. "$class->grab_for()" Returns the number of seconds workers of this class will claim a grabbed a job. That is, returns the length of the timeout after which other workers will decide a worker that claimed a job has crashed or faulted without marking the job failed. Jobs that are marked as failed by a worker are also marked for immediate retry after a delay indicated by "retry_delay()". USAGE
"$class->grab_job( $client )" Finds and claims a job for workers with ability $class, using "TheSchwartz" client $client. This job can then be passed to "work()" or "work_safely()" to perform it. "$class->work_safely( $job )" Performs the job associated with the worker's class name. If an error is thrown while doing the job, the job is appropriately marked as failed, unlike when calling "work()" directly. perl v5.10.0 2008-03-02 TheSchwartz::Worker(3pm)
Man Page