This commit is contained in:
as2252258@163.com
2021-04-17 15:45:02 +08:00
parent 393584da26
commit e4d5aba911
+8 -4
View File
@@ -214,14 +214,18 @@ abstract class Crontab extends BaseObject
}
/**
* @return bool|int
* @throws Exception
*/
/**
* @return bool|int
* @throws Exception
*/
public function isRecover(): bool|int
{
try {
$redis = Snowflake::app()->getRedis();
if ($redis->exists('stop:crontab:' . $this->getName())) {
$redis->del('stop:crontab:' . $this->getName());
return true;
}
if ($this->isExit()) {
return $redis->del('crontab:' . $this->getName());
}