This commit is contained in:
as2252258@163.com
2021-05-04 03:07:11 +08:00
parent 6230db7a4f
commit a8eebeb902
4 changed files with 19 additions and 18 deletions
+1 -1
View File
@@ -179,7 +179,7 @@ class Logger extends Component
$files = glob(storage(null, $dirName) . '/*');
if (count($files) >= 15) {
$command = 'find ' . storage(null, $dirName) . '/ -mtime +15 -name "*.log" -exec rm -rf {} \;';
if (Context::inCoroutine()) {
if (Coroutine::getCid() !== -1) {
Coroutine\System::exec($command);
} else {
\shell_exec($command);