-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return More Information from Consumer::once
Via a result object. this is to make some telemetry stuff easier.
- Loading branch information
1 parent
508a72c
commit 46b0ab5
Showing
6 changed files
with
73 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of PMG\Queue | ||
* | ||
* Copyright (c) PMG <https://www.pmg.com> | ||
* | ||
* For full copyright information see the LICENSE file distributed | ||
* with this source code. | ||
* | ||
* @license http://opensource.org/licenses/Apache-2.0 Apache-2.0 | ||
*/ | ||
|
||
namespace PMG\Queue; | ||
|
||
final readonly class OnceResult | ||
{ | ||
public function __construct( | ||
/** | ||
* Whether or not the `once` method ran successfully -- eg a message | ||
* was handled without an error. | ||
*/ | ||
public bool $successful, | ||
/** | ||
* True if the message has been put back in the queue to retry | ||
*/ | ||
public bool $retrying, | ||
/** | ||
* The message that was processed | ||
*/ | ||
public object $message, | ||
) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters