Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 550 Bytes

README.md

File metadata and controls

29 lines (22 loc) · 550 Bytes

Currently very much WIP!

Install via composer

composer require basekit/faktory_worker_php

Add jobs

$client = new FaktoryClient($faktoryHost, $faktoryPort);
$job = new FaktoryJob($id, $type, $args);
$client->push($job);

Process jobs

$client = new FaktoryClient($faktoryHost, $faktoryPort);
$worker = new FaktoryWorker($client);
$worker->register('somejob', function ($job) {
    echo "You got the job buddy!\n";
    var_dump($job);
});

$worker->setQueues(['critical', 'default', 'bulk']);
$worker->run();