|
@@ -8,26 +8,33 @@ class testWorker
|
|
|
|
|
|
/**
|
|
/**
|
|
* Test method to run as a job
|
|
* Test method to run as a job
|
|
- *
|
|
|
|
|
|
+ *
|
|
* @param \GearmanJob $job Object with job parameters
|
|
* @param \GearmanJob $job Object with job parameters
|
|
*
|
|
*
|
|
|
|
+ * @return boolean
|
|
|
|
+ *
|
|
* @Gearman\Job(iterations=3, name="test", description="This is a description") *
|
|
* @Gearman\Job(iterations=3, name="test", description="This is a description") *
|
|
*/
|
|
*/
|
|
public function testA(\GearmanJob $job)
|
|
public function testA(\GearmanJob $job)
|
|
{
|
|
{
|
|
- echo get_class($job);die();
|
|
|
|
echo 'Job testA done!'.PHP_EOL;
|
|
echo 'Job testA done!'.PHP_EOL;
|
|
|
|
+
|
|
|
|
+ return true;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* Test method to run as a job
|
|
* Test method to run as a job
|
|
*
|
|
*
|
|
* @param \GearmanJob $job Object with job parameters
|
|
* @param \GearmanJob $job Object with job parameters
|
|
- *
|
|
|
|
|
|
+ *
|
|
|
|
+ * @return boolean
|
|
|
|
+ *
|
|
* @Gearman\Job
|
|
* @Gearman\Job
|
|
*/
|
|
*/
|
|
public function testB(\GearmanJob $job)
|
|
public function testB(\GearmanJob $job)
|
|
{
|
|
{
|
|
echo 'Job testB done!'.PHP_EOL;
|
|
echo 'Job testB done!'.PHP_EOL;
|
|
|
|
+
|
|
|
|
+ return true;
|
|
}
|
|
}
|
|
}
|
|
}
|