2020-09-10 19:26:42 +08:00
|
|
|
<?php
|
2020-10-29 18:18:57 +08:00
|
|
|
declare(strict_types=1);
|
2020-09-10 19:26:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Queue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use Snowflake\Snowflake;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class TestQueue
|
|
|
|
|
* @package Queue
|
|
|
|
|
*/
|
|
|
|
|
class TestQueue implements Consumer
|
|
|
|
|
{
|
|
|
|
|
|
2020-10-29 18:18:57 +08:00
|
|
|
public array $params;
|
2020-09-10 19:26:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* TestQueue constructor.
|
|
|
|
|
* @param array $params
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(array $params)
|
|
|
|
|
{
|
|
|
|
|
$this->params = $params;
|
|
|
|
|
$this->onWaiting();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public function onWaiting()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function onRunning()
|
|
|
|
|
{
|
|
|
|
|
// TODO: Implement onRunning() method.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function onComplete()
|
|
|
|
|
{
|
|
|
|
|
// TODO: Implement onComplete() method.
|
|
|
|
|
}
|
|
|
|
|
}
|