This commit is contained in:
2021-04-22 12:42:55 +08:00
parent d6ceac9852
commit f8b3ee77e5
2 changed files with 7 additions and 9 deletions
+6 -5
View File
@@ -57,11 +57,12 @@ class Producer extends Component
}
/**
* @param string $name
* @throws Exception
*/
public function exists(string $name)
/**
* @param string $name
* @return bool
* @throws Exception
*/
public function exists(string $name): bool
{
$redis = Snowflake::app()->getRedis();
if ($redis->exists('crontab:' . md5($name))) {
+1 -4
View File
@@ -96,10 +96,7 @@ class Logger extends Component
$message = $this->arrayFormat($message);
}
if (!empty($message)) {
if (!is_array($this->logs)) {
$this->logs = [];
}
$this->logs[] = [$method, $message];
$this->write($message, $method);
}
return $message;
}