Skip to content

Commit d221d0c

Browse files
author
creative-life.club
committed
增加soar二进制文件是否存在的判断
1 parent 5ba9cbe commit d221d0c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

publish/soar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
return [
1616
'enabled' => env('SOAR_ENABLED', env('APP_ENV') === 'local'),
17-
'-soar-path' => env('SOAR_PATH', ''), // soar 二进制文件存储路径
17+
'-soar-path' => env('SOAR_PATH', ''), // soar 二进制文件的绝对路径
1818
'-test-dsn' => [
1919
'host' => env('SOAR_TEST_DSN_HOST', '127.0.0.1'),
2020
'port' => env('SOAR_TEST_DSN_PORT', '3306'),

src/Aspect/ResponseAspect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint)
6767
{
6868
$sqlKey = class_basename(QueryExecListener::class);
6969

70-
if (! $this->config['enabled'] || ! Context::has($sqlKey)) {
70+
if (! $this->config['enabled'] || ! Context::has($sqlKey) || ! is_file($this->config['-soar-path'])) {
7171
return $proceedingJoinPoint->process();
7272
}
7373

0 commit comments

Comments
 (0)