The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Garivini::Controller - Gearman worker for executing Garivini jobs

DESCRIPTION

Picks up asynchronously submitted Garivini jobs, then synchronously submits them back through Gearman to a real worker.

Once the worker completes the job, it is removed from the Garivini DB or rescheduled for a future retry.

You need to run as many Controller workers as you have workers for other jobs.

NOTE that this is an optional worker for providing job routing via pure Gearman calls, or providing low latency. If using Garivini::Client directly, only Garivini::QueueRunner workers are needed.

SYNOPSIS

    my $worker = Garivini::Controller->new(dbs => {
        1 => { id => 1, dsn => 'DBI:mysq:job:host=127.0.0.1', user => 'job',
            pass => 'job' } },
        job_servers => ['127.0.0.1']);
    $worker->work;