Skip to content

Commit afdf2bf

Browse files
修复 doAndSubmit abort 没有传参的bug
Fixed doAndSubmit abort
2 parents c596d99 + 4c723d5 commit afdf2bf

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ jobs:
2525
with:
2626
php-version: ${{ matrix.php-version }}
2727
tools: phpize
28-
ini-values: opcache.enable_cli=1
28+
ini-values:
29+
opcache.enable_cli=1
30+
2931
coverage: none
3032
- name: Setup Swoole
3133
if: ${{ matrix.engine == 'swoole' }}
3234
run: |
35+
sudo apt-get update
3336
sudo apt-get install libcurl4-openssl-dev
3437
wget https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz -O swoole.tar.gz
3538
mkdir -p swoole
@@ -71,5 +74,8 @@ jobs:
7174
composer require hyperf/http-server
7275
composer require hyperf/db
7376
composer require hyperf/db-connection
77+
composer require hyperf/json-rpc
78+
composer require hyperf/rpc-client
79+
composer require symfony/serializer:^5.0
7480
composer analyse
7581
composer test

src/Msg.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ public function doAndSubmit(string $queryPrepared, callable $businessCall)
4949
$businessCall();
5050
$this->submit();
5151
} catch (FailureException $failureException) {
52-
$this->api->abort();
52+
$this->api->abort([
53+
'gid' => TransContext::getGid(),
54+
'trans_type' => TransType::MSG,
55+
]);
5356
throw $failureException;
5457
} catch (\Exception $exception) {
5558
$this->queryPrepared($queryPrepared);

0 commit comments

Comments
 (0)