改名
This commit is contained in:
@@ -20,8 +20,6 @@ abstract class Crontab extends BaseObject
|
|||||||
|
|
||||||
const WAIT_END = 'crontab:wait:execute';
|
const WAIT_END = 'crontab:wait:execute';
|
||||||
|
|
||||||
private array|Closure $handler;
|
|
||||||
|
|
||||||
|
|
||||||
private string $name = '';
|
private string $name = '';
|
||||||
|
|
||||||
@@ -42,7 +40,6 @@ abstract class Crontab extends BaseObject
|
|||||||
|
|
||||||
|
|
||||||
private int $execute_number = 0;
|
private int $execute_number = 0;
|
||||||
private array|Closure|null $_max_execute_handler = null;
|
|
||||||
|
|
||||||
|
|
||||||
private bool $_stop = false;
|
private bool $_stop = false;
|
||||||
@@ -66,13 +63,6 @@ abstract class Crontab extends BaseObject
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array|Closure
|
|
||||||
*/
|
|
||||||
public function getHandler(): array|Closure
|
|
||||||
{
|
|
||||||
return $this->handler;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
@@ -123,17 +113,6 @@ abstract class Crontab extends BaseObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array|Closure $handler
|
|
||||||
*/
|
|
||||||
public function setHandler(array|Closure $handler): void
|
|
||||||
{
|
|
||||||
if ($handler instanceof Closure) {
|
|
||||||
Closure::bind($handler, $this, $this);
|
|
||||||
}
|
|
||||||
$this->handler = $handler;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
*/
|
*/
|
||||||
@@ -227,14 +206,6 @@ abstract class Crontab extends BaseObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Closure|array $closure
|
|
||||||
*/
|
|
||||||
public function setMaxExecute(Closure|array $closure)
|
|
||||||
{
|
|
||||||
$this->_max_execute_handler = $closure;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
abstract public function process(): mixed;
|
abstract public function process(): mixed;
|
||||||
|
|
||||||
@@ -276,7 +247,7 @@ abstract class Crontab extends BaseObject
|
|||||||
*/
|
*/
|
||||||
private function isExit(): bool
|
private function isExit(): bool
|
||||||
{
|
{
|
||||||
if ($this->_stop === true) {
|
if ($this->isStop()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!$this->isLoop) {
|
if (!$this->isLoop) {
|
||||||
|
|||||||
Reference in New Issue
Block a user