This commit is contained in:
2021-04-15 20:23:01 +08:00
parent df974e4b08
commit bb2dfcdaf9
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -183,6 +183,10 @@ abstract class Crontab extends BaseObject
private function recover()
{
$redis = Snowflake::app()->getRedis();
if (!$redis->exists('stop:crontab:' . $this->getName())) {
$redis->del('stop:crontab:' . $this->getName());
return;
}
$redis->set('crontab:' . ($name = $this->getName()), swoole_serialize($this));