改名
This commit is contained in:
@@ -24,7 +24,7 @@ abstract class Crontab extends BaseObject
|
|||||||
private string $name = '';
|
private string $name = '';
|
||||||
|
|
||||||
|
|
||||||
private mixed $params = null;
|
private mixed $params = [];
|
||||||
|
|
||||||
|
|
||||||
private int $tickTime = 1;
|
private int $tickTime = 1;
|
||||||
@@ -42,18 +42,6 @@ abstract class Crontab extends BaseObject
|
|||||||
private int $execute_number = 0;
|
private int $execute_number = 0;
|
||||||
|
|
||||||
|
|
||||||
private bool $_stop = false;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function stop()
|
|
||||||
{
|
|
||||||
$this->_stop = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ class Producer extends Component
|
|||||||
|
|
||||||
$tickTime = time() + $crontab->getTickTime();
|
$tickTime = time() + $crontab->getTickTime();
|
||||||
|
|
||||||
var_export($crontab);
|
|
||||||
|
|
||||||
$redis->zAdd(self::CRONTAB_KEY, $tickTime, $name);
|
$redis->zAdd(self::CRONTAB_KEY, $tickTime, $name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ class Zookeeper extends Process
|
|||||||
*/
|
*/
|
||||||
private function dispatch($server, Redis|\Redis $redis, int $setting, $value)
|
private function dispatch($server, Redis|\Redis $redis, int $setting, $value)
|
||||||
{
|
{
|
||||||
var_export($value);
|
|
||||||
$server->sendMessage(swoole_serialize([
|
$server->sendMessage(swoole_serialize([
|
||||||
'action' => 'crontab', 'handler' => swoole_unserialize($redis->get('crontab:' . $value))
|
'action' => 'crontab', 'handler' => swoole_unserialize($redis->get('crontab:' . $value))
|
||||||
]), random_int(0, $setting - 1));
|
]), random_int(0, $setting - 1));
|
||||||
|
|||||||
Reference in New Issue
Block a user