modify
This commit is contained in:
@@ -214,14 +214,18 @@ abstract class Crontab extends BaseObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool|int
|
* @return bool|int
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function isRecover(): bool|int
|
public function isRecover(): bool|int
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$redis = Snowflake::app()->getRedis();
|
$redis = Snowflake::app()->getRedis();
|
||||||
|
if ($redis->exists('stop:crontab:' . $this->getName())) {
|
||||||
|
$redis->del('stop:crontab:' . $this->getName());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if ($this->isExit()) {
|
if ($this->isExit()) {
|
||||||
return $redis->del('crontab:' . $this->getName());
|
return $redis->del('crontab:' . $this->getName());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user