Skip to content

Commit

Permalink
修复 doAndSubmit abort 没有传参的bug
Browse files Browse the repository at this point in the history
Fixed doAndSubmit abort
  • Loading branch information
PandaLIU-1111 authored May 16, 2022
2 parents c596d99 + 4c723d5 commit afdf2bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
tools: phpize
ini-values: opcache.enable_cli=1
ini-values:
opcache.enable_cli=1

coverage: none
- name: Setup Swoole
if: ${{ matrix.engine == 'swoole' }}
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
wget https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz -O swoole.tar.gz
mkdir -p swoole
Expand Down Expand Up @@ -71,5 +74,8 @@ jobs:
composer require hyperf/http-server
composer require hyperf/db
composer require hyperf/db-connection
composer require hyperf/json-rpc
composer require hyperf/rpc-client
composer require symfony/serializer:^5.0
composer analyse
composer test
5 changes: 4 additions & 1 deletion src/Msg.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ public function doAndSubmit(string $queryPrepared, callable $businessCall)
$businessCall();
$this->submit();
} catch (FailureException $failureException) {
$this->api->abort();
$this->api->abort([
'gid' => TransContext::getGid(),
'trans_type' => TransType::MSG,
]);
throw $failureException;
} catch (\Exception $exception) {
$this->queryPrepared($queryPrepared);
Expand Down

0 comments on commit afdf2bf

Please sign in to comment.