改名
This commit is contained in:
@@ -112,14 +112,12 @@ class Application extends BaseApplication
|
|||||||
|
|
||||||
fire(Event::SERVER_BEFORE_START);
|
fire(Event::SERVER_BEFORE_START);
|
||||||
|
|
||||||
run(function () use ($argv) {
|
|
||||||
$this->set('input', $argv);
|
$this->set('input', $argv);
|
||||||
|
|
||||||
$manager = Snowflake::app()->get('console');
|
$manager = Snowflake::app()->get('console');
|
||||||
$manager->setParameters($argv);
|
$manager->setParameters($argv);
|
||||||
$class = $manager->search();
|
$class = $manager->search();
|
||||||
response()->send($manager->execCommand($class));
|
response()->send($manager->execCommand($class));
|
||||||
});
|
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
response()->send(implode("\n", [
|
response()->send(implode("\n", [
|
||||||
'Msg: ' . $exception->getMessage(),
|
'Msg: ' . $exception->getMessage(),
|
||||||
|
|||||||
@@ -168,10 +168,10 @@ class Logger extends Component
|
|||||||
$files = glob(storage(null, $dirName) . '/*');
|
$files = glob(storage(null, $dirName) . '/*');
|
||||||
if (count($files) >= 15) {
|
if (count($files) >= 15) {
|
||||||
$command = 'find ' . storage(null, $dirName) . '/ -mtime +15 -name "*.log" -exec rm -rf {} \;';
|
$command = 'find ' . storage(null, $dirName) . '/ -mtime +15 -name "*.log" -exec rm -rf {} \;';
|
||||||
if (Context::inCoroutine())
|
// if (Context::inCoroutine())
|
||||||
Coroutine\System::exec($command);
|
// Coroutine\System::exec($command);
|
||||||
else
|
// else
|
||||||
exec($command);
|
// exec($command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user