This commit is contained in:
2021-04-14 15:09:15 +08:00
parent 9f2e017871
commit d51a912ddf
+3 -1
View File
@@ -29,7 +29,9 @@ class Producer extends Component
$name = $crontab->getName();
if ($redis->type(self::CRONTAB_KEY) !== \Redis::REDIS_ZSET) {
if (
$redis->exists(self::CRONTAB_KEY) &&
$redis->type(self::CRONTAB_KEY) !== \Redis::REDIS_ZSET) {
throw new Exception('Cache key ' . self::CRONTAB_KEY . ' types error.');
}