This commit is contained in:
2021-03-02 13:49:53 +08:00
parent 66543b8274
commit dd6f64d87f
2 changed files with 9 additions and 11 deletions
+4 -4
View File
@@ -168,10 +168,10 @@ 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())
Coroutine\System::exec($command);
else
exec($command);
// if (Context::inCoroutine())
// Coroutine\System::exec($command);
// else
// exec($command);
}
}