Merge pull request #6231 from gadelkareem/patch-2
Allow gearman environment vars
This commit is contained in:
commit
3d7ddc89b4
@ -16,7 +16,10 @@ class LockAgentWorker
|
|||||||
$lockAgent = new LockAgentWorker();
|
$lockAgent = new LockAgentWorker();
|
||||||
|
|
||||||
$worker = new \GearmanWorker();
|
$worker = new \GearmanWorker();
|
||||||
$worker->addServer();
|
$worker->addServer(
|
||||||
|
isset($_SERVER['GEARMAN_HOST']) ? $_SERVER['GEARMAN_HOST'] : null,
|
||||||
|
isset($_SERVER['GEARMAN_PORT']) ? $_SERVER['GEARMAN_PORT'] : 4730
|
||||||
|
);
|
||||||
$worker->addFunction("findWithLock", [$lockAgent, "findWithLock"]);
|
$worker->addFunction("findWithLock", [$lockAgent, "findWithLock"]);
|
||||||
$worker->addFunction("dqlWithLock", [$lockAgent, "dqlWithLock"]);
|
$worker->addFunction("dqlWithLock", [$lockAgent, "dqlWithLock"]);
|
||||||
$worker->addFunction('lock', [$lockAgent, 'lock']);
|
$worker->addFunction('lock', [$lockAgent, 'lock']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user