Skip to content

baohanddd/request

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

swoole-gearman

A job dispatcher based on swoole

Install

Install swoole first.

composer update baohan/swoole-job

How

Quick start

$router = new \baohan\SwooleJob\Router();
$router->setPrefix("\\App\\Job\\");
$router->setExecutor("execute");
$router->setDecode(function($data) {
    return json_decode($data, true);
});

$serv = new \baohan\SwooleJob\Server($router);
$serv->setSwoolePort(9505);
// custom callback event
$serv->setEvtStart(function($serv) {
    echo "server start!" . PHP_EOL;
});
$serv->start();

Configure

Event callbacks

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages