Skip to content

Commit 485ba33

Browse files
committed
Merge branch 'master' into 3.2-merge
# Conflicts: # .github/workflows/test.yml # src/command/composer.json # src/serializer/src/Contract/CacheableSupportsMethodInterface.php # src/validation/src/ValidationRuleParser.php
2 parents fa46bc4 + 0ed66a8 commit 485ba33

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/tests export-ignore
22
/.github export-ignore
3+
/types export-ignore

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"hyperf/collection": "~3.2.0",
1414
"hyperf/context": "~3.2.0",
1515
"hyperf/contract": "~3.2.0",
16+
"hyperf/coordinator": "~3.2.0",
1617
"hyperf/coroutine": "~3.2.0",
1718
"hyperf/di": "~3.2.0",
1819
"hyperf/stringable": "~3.2.0",
@@ -46,4 +47,4 @@
4647
"config": "Hyperf\\Command\\ConfigProvider"
4748
}
4849
}
49-
}
50+
}

src/Command.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
namespace Hyperf\Command;
1414

15+
use Hyperf\Coordinator\Constants;
16+
use Hyperf\Coordinator\CoordinatorManager;
1517
use Hyperf\Coroutine\Coroutine;
1618
use Psr\EventDispatcher\EventDispatcherInterface;
1719
use Swoole\ExitException;
@@ -197,6 +199,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int
197199
$this->eventDispatcher->dispatch(new Event\FailToHandle($this, $exception));
198200
} finally {
199201
$this->eventDispatcher?->dispatch(new Event\AfterExecute($this, $exception ?? null));
202+
203+
try {
204+
if ($this->getApplication()->isAutoExitEnabled()) {
205+
CoordinatorManager::until(Constants::WORKER_EXIT)->resume();
206+
}
207+
} catch (Throwable) {
208+
}
200209
}
201210

202211
return $this->exitCode;

0 commit comments

Comments
 (0)