Skip to content

Commit

Permalink
Use onAfterTransactino
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed Dec 12, 2023
1 parent d763b01 commit e705d48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"require": {
"bref/bref": "2.1.9",
"bref/extra-php-extensions": "1.3.2",
"craftcms/cms": "^4.5.11 || ^5",
"craftcms/cms": "^4.5.12 || ^5",
"craftcms/flysystem": "^1.0.0",
"league/flysystem-aws-s3-v3": "^3.15",
"league/uri": "^7",
Expand Down
2 changes: 1 addition & 1 deletion src/queue/SqsQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected function pushMessage($message, $ttr, $delay, $priority): string
* will consider the job processed. Once the transaction ends,
* the job will exist and be indefinitely pending.
*/
Craft::$app->onAfterRequest(function() use ($message, $ttr, $delay) {
Craft::$app->getDb()->onAfterTransaction(function() use ($message, $ttr, $delay) {

/**
* @phpstan-ignore-next-line
Expand Down

0 comments on commit e705d48

Please sign in to comment.